Hi people,
I was trying to sync with a RSS feed having hindi fonts (unicode), but it displayed garbage, I have used hindi fonts( unicode) in blog entrys, they work fine there, not sure whats wrong with hindi RSS feeds, this is the feed url i m trying http://www.bbc.co.uk/hindi/index.xml
please help
Regards
-Manish
http://my.linuxindia.net
hindi unicode fonts ?
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: hindi unicode fonts ?
What exactly did you try to do? Use the sidebar plugin to show that feed, import those entries, ... ?
Basically, your blog is ISO-8859-1, while the page you mention is UTF8-input. Thus, some recoding might be needed, which might need additional PHP modules (iconv/recode) on your system.
Regards,
Garvin
Basically, your blog is ISO-8859-1, while the page you mention is UTF8-input. Thus, some recoding might be needed, which might need additional PHP modules (iconv/recode) on your system.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
yes I am using side bar plugin for RSS/OPL feeds, actaully i had contacted BBC guys for this problem they told me that they are using unicode fonts, so i had changed back to unicode for RSS feeds, but still it didnt worked, and they also told me that language support sud be added to RSS reader, but i dont think its reqd in case of unicode fonts.
what do u suggest ?
what do u suggest ?
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
The problem is, that PHPs utf8_decode format can only decode UTF-8 to ISO-8859-1. However the special hindi characters you mention can NOT be converted into ISO-8859-1 or even ISO-8859-2 which you are using.
The reason why hindi chars work in your blog is because you are using HTML entities instead of the characters.
Basically, there is no easy solution to your problem.
For the hard solution you have two options.
OPTION 1: Upgrade to Serendipity 0.9. This allows you to set the Charset of your Blog to UTF-8 in the Configuration. Now you can set the RSS feed to "Native" and then all UTF-8 content will be shown properly.
OPTION 2: Edit your lang/serendipity_lang_XX.inc.php file and change the LANG_CHARSET line to "UTF-8" manually. Then use your favourite editor to save that lang file in UTF-8 format.
For both options, the hard way is now that your current entries will loose any ISO-8859-2 special characters. That in turn means you need to convert all your data from ISO-8859-2 to UTF-8. That can be done by dumping your whole Database in SQL format, then use an editor to save the SQL file in UTF-8 format, and then upload the SQL dump to your database again. Then all your DB content will be in UTF-8 format.
I'm really sorry, but using foreign charsets in any other environment than UTF-8 is impossible. That is why Serendipity 0.9 will lead towards using UTF-8 as default.
Regards,
Garvin
The reason why hindi chars work in your blog is because you are using HTML entities instead of the characters.
Basically, there is no easy solution to your problem.
For the hard solution you have two options.
OPTION 1: Upgrade to Serendipity 0.9. This allows you to set the Charset of your Blog to UTF-8 in the Configuration. Now you can set the RSS feed to "Native" and then all UTF-8 content will be shown properly.
OPTION 2: Edit your lang/serendipity_lang_XX.inc.php file and change the LANG_CHARSET line to "UTF-8" manually. Then use your favourite editor to save that lang file in UTF-8 format.
For both options, the hard way is now that your current entries will loose any ISO-8859-2 special characters. That in turn means you need to convert all your data from ISO-8859-2 to UTF-8. That can be done by dumping your whole Database in SQL format, then use an editor to save the SQL file in UTF-8 format, and then upload the SQL dump to your database again. Then all your DB content will be in UTF-8 format.
I'm really sorry, but using foreign charsets in any other environment than UTF-8 is impossible. That is why Serendipity 0.9 will lead towards using UTF-8 as default.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/