You are here:  » Russian Characters cannot display


Russian Characters cannot display

Submitted by bayuobie on Wed, 2011-07-20 09:09 in

Hi David,

I just realised that magicparser has difficulty parsing Russian characters and is displaying ????? for most of the products that i'm picking from the feed. I'm using the cleansing version of magicparser. I'm calling the MagicParserISO88591.php. For instance, the description below:

Особенности модели: оригинальный крой, двойной воротник, застегивается на кнопки и пуговицу, длинный рукав
Цвет: металлический сливовый

is showing as

??????????? ??????: ???????????? ????, V-???????? ?????, ??????? ?????, ???????????? ???????

????: ???????

After it's parsed.

Any ideas as to how I can overcome this

Blaise

Submitted by support on Wed, 2011-07-20 10:17

Hello Blaise,

This is normally simply because the character encoding of your output does not match the character encoding of the data in the feed - that's all.

To correct this, add an appropriate Content-Type header to very top of your script, for example:

  header("Content-Type: text/html; charset=utf-8");

(just after the opening PHP tag)

utf-8 is the most common charset, but if that still doesn't display the characters correctly try iso-8859-1 in place...

Hope this helps,
Cheers,
David
--
MagicParser.com

Submitted by bayuobie on Wed, 2011-07-20 10:38

Hi David,

Your suggestion to use header("Content-Type: text/html; charset=utf-8") worked.

Thanks