RSS news in russian: trouble with encoding

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
DeepHawk
Posts: 9
Joined: Fri 6. May 2005, 10:21
Contact:

RSS news in russian: trouble with encoding

Post by DeepHawk »

Hi,

I've russian rss channel with xml like this:

Code: Select all

<?xml version='1.0' encoding="windows-1251"?>
<rss version='2.0'>
<channel>
...
when I create article with RSS content, news on frontend are show with broken characters.
what can i do ?
luna
Posts: 28
Joined: Sun 18. Apr 2004, 06:02

Post by luna »

change the encoding line 92 in include/inc_ext/rsswriter/rss10.inc.php
from echo '<?xml version="1.0" encoding="iso-8859-1"?> to
echo '<?xml version="1.0" encoding="windows-1251"?>
DeepHawk
Posts: 9
Joined: Fri 6. May 2005, 10:21
Contact:

Post by DeepHawk »

doesn't work :(
User avatar
Oliver Georgi
Site Admin
Posts: 9906
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

maybe importer has problems when encoding of feed is not iso-8859-1 or UTF-8

Can you send me a link to a Russian RSS feed. I will check that. A charcode conversion has to be done to work properly.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
DeepHawk
Posts: 9
Joined: Fri 6. May 2005, 10:21
Contact:

Post by DeepHawk »

DeepHawk
Posts: 9
Joined: Fri 6. May 2005, 10:21
Contact:

Post by DeepHawk »

any idea ?
User avatar
Oliver Georgi
Site Admin
Posts: 9906
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

haven't time to fix it ;-)

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
Oliver Georgi
Site Admin
Posts: 9906
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

OK, I think I have fixed it.

download and expand following file into
include/inc_ext/ConvertCharset
http://www.phpwcms.de/support/ConvertCharset.zip

and replace function parseRSS in
include/inc_front/front.func.inc.php
http://www.phpwcms.de/support/parseRSS.txt

This converts charset found in RSS file to UTF-8 entities.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
DeepHawk
Posts: 9
Joined: Fri 6. May 2005, 10:21
Contact:

Post by DeepHawk »

BIG THANKS! It's working!!
DeepHawk
Posts: 9
Joined: Fri 6. May 2005, 10:21
Contact:

Post by DeepHawk »

One more question: what replacement tag can i use for feeds body text preview in list ? i found {title} and {link}.
User avatar
Oliver Georgi
Site Admin
Posts: 9906
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

have to check again :)

Don't know if it is implemented.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Post Reply