RSS with non-ISO charset

RSS with non-ISO charset

by Dmitry Pupinin -
Number of replies: 3
Picture of Core developers Picture of Plugin developers
Again problem with non-ISO charset...
Text converted to UTF using utf8_encode, but it works only with ISO charset.
Solving this problem - using iconv library but not all use PHP compiled with iconv. I offer to place charset depended function for encode/decode in separated files like windows-1251.php and include this function in runtime.

This problem solved. See bug #2748

But I think that such method necessary to use in backup and other places where used utf8_encode and utf8_decode.

Appears the question: where better place windows-1251.php and other files? Maybe in /lib?
Average of ratings: -
In reply to Dmitry Pupinin

Re: RSS with non-ISO charset

by Robert Peterson -
My site uses the windows-1251 encoding but the RSS block, powered by magpie, does not appear to support it. The RSS block recognizes the feed but prints strange letters.

This is the feed: http://www.darik.net/syndicate/rss_custom.php?cust=education

There is a Moodle bug (#3107) listed in the tracker as follows:

"in moodle/blocks/rss_client/block_rss_client_action.php and block_rss_client.php, before call fetch_rss(), should call define('MAGPIE_OUTPUT_ENCODING', get_string('thischarset')); But only 'UTF-8', 'US-ASCII' and 'ISO-8859-1' supported for the reason of magpie"

I think this was fixed for new Moodle versions, but I cannot upgrade from Moodle 1.5.4 for reasons of my website host.

Is there some workaround? I have tried everything I can thing of, even setting up a custom block with some RSS feed scripts that I found on the web, e.g., http://www.feedforall.com. These free scripts do not seem to execute properly from within a block.

In Dmitry's discussion here, a windows-1251.php file is suggested in the bug tracker for 2748, but I cannot figure out what code to put in the file.