sreejith12 / rsslounge

Automatically exported from code.google.com/p/rsslounge
0 stars 0 forks source link

Unicode characters not displayed properly #39

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
All feeds containing unicode characters are not displayed properly. Charset in 
the browser is set to Unicode(UTF-8), original articles also has the proper 
one. The same feeds in Google Reader or any other rss reader look OK.

Changing charset or font in the browser does not help, it looks like the page 
is generated with broken characters.

Example screenshot in attachement, link to original article from the feed: 
http://osnews.pl/nagrody-za-zaangazowanie-w-projekt-haiku/

What version of the product are you using? On what operating system?

Windows XP Professional SP3
Firefox 3.6.9
IE 8

Original issue reported on code.google.com by totallyu...@gmail.com on 15 Sep 2010 at 11:06

Attachments:

GoogleCodeExporter commented 8 years ago
This seems to be a web server configuration issue. By testing this on my own 
server, the feeds items will be shown correctly. Which server environment do 
you use?

Original comment by zzuzzlwuzzl@googlemail.com on 2 Dec 2010 at 6:47

GoogleCodeExporter commented 8 years ago
It's running apache, no idea about the version. I have attached phpinfo() 
results.

Original comment by totallyu...@gmail.com on 13 Jan 2011 at 2:16

Attachments:

GoogleCodeExporter commented 8 years ago
I also encountered this problem. After doing Ctrl-F5 refresh of rsslounge all 
characters are displayed correctly, but after clicking different category, or 
changing diplay from unread to all, every unicode character is displayed 
incorrectly.

FreeBSD 8.2, apache2.2.17, php 5.3.6

Original comment by sochotni...@gmail.com on 25 Jul 2011 at 7:31

GoogleCodeExporter commented 8 years ago
For example rsslounge has problem with this rss: http://www.root.cz/rss/clanky/

Original comment by sochotni...@gmail.com on 25 Jul 2011 at 7:33

GoogleCodeExporter commented 8 years ago
I am using Chinese and I have the same issue. I need to press Ctrl-F5 (Firefox) 
or Ctrl-R (IE) to get correct Chinese display. Any suggestion?

Original comment by jeremy...@gmail.com on 5 Oct 2011 at 9:45

GoogleCodeExporter commented 8 years ago
I had the same problem with greek characters. I fixed it by changing the 
following line 
(http://code.google.com/p/rsslounge/source/browse/trunk/application/controllers/
ItemController.php#80) and removing both utf8_* calls.
In other words just replace this line by the following one:
            'html'           => $this->view->render('item/list.'.Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer')->getViewSuffix()),

This alone fixed my problems. But I wanted to make some more changes because I 
realized that the data saved in my DB were not written correctly (utf-8 chars 
seem to be converted into another encoding when written/read from the DB).

I updated SimplePie to the latest version but I do not think that this changes 
anything. Moreover, I added another line at 
http://code.google.com/p/rsslounge/source/browse/trunk/plugins/rss/feed.php#166:
after init(), add "@$this->feed->handle_content_type();".

Finally, I think that the whole DB issue is that my hosting service does not 
set utf-8 as the default encoding for clients connecting to MySQL (not checked 
yet though). I will make some more attempts to fix that and come back to you.

Original comment by papad...@gmail.com on 3 Nov 2011 at 11:21

GoogleCodeExporter commented 8 years ago
Ok, found also the solution for the DB. Add the following line into the 
config.ini:
resources.db.params.charset = "utf8"

Now everything should be utf-8 everywhere (I think that if an RSS feed is not 
in utf8, SimplePie takes care of the conversion therefore everything rssLounge 
saves/reads is now in utf8 encoding).

Original comment by papad...@gmail.com on 3 Nov 2011 at 12:39

GoogleCodeExporter commented 8 years ago
Could this be made the default setting (resources.db.params.charset = "utf8") ?

Original comment by nodiscc on 1 Oct 2012 at 7:58

GoogleCodeExporter commented 8 years ago
> Now everything should be utf-8 everywhere (I think that if an RSS feed is not 
in utf8, SimplePie takes care of the conversion therefore everything rssLounge 
saves/reads is now in utf8 encoding).

Maybe, right. There could be a simple checkbox in RSSLounge settings interface 
to enable UTF-8. Would that be convenient?

Original comment by nodiscc on 22 Nov 2012 at 4:59