Topic: utf-8 problem

hi
i use the simple chinese translation package, but in the installed_languages.php file i set the encoding is utf-8. when i open the page, the chinese character is showed wrongly. i must change the IE's encodint to gb2312 in order show rightly.  my quesetion is where do you set the page's encoding.

Regards
/leo

Re: utf-8 problem

i use the poedit to translate the english into the simple chinese, the set the encoding is the utf-8, why i can't set the encoding utf-8 in the installed_language.php

Re: utf-8 problem

In poEdit you set the encoding in 'Catalog' - 'Settings'.
If you do not have gettext installed on your server, FA is creating a php file where the .po file resides. If you change the encoding, you should delete this php file.

/Joe

4 (edited by Leo 04/27/2009 03:44:55 pm)

Re: utf-8 problem

i use the apache2triad and i think that the gettext is intalled defautly.
i did't see the php file where the .po file resides.
there are two new question. the first is the encoding used by IE is decided by the  installed_languages.php?
the second is .po's encoding is utf-8 why i can't use the utf-8 in the installed_languages.php like this
$installed_languages = array (
array ('code' => 'en_US', 'name' => 'English(US)', 'encoding' => 'iso-8859-1'),
array ('code' => 'zh_CN', 'name' => 'Chinese', 'encoding' => 'utf-8'),);
$dflt_lang = 'zh_CN';

Re: utf-8 problem

Please read through the topics in Translation. I guess there was someone having a similar problem. He changed something to utf8 instead of utf-8, and suddenly it worked. But I can't remember exactly.

/Joe

Re: utf-8 problem

if use the UTF-8, must set php page: header(”Content-Type: text/html; charset=UTF-8″) ?

Re: utf-8 problem

Did this help? I hope someone else using the chinese package can reflect to our problem.

/Joe

Re: utf-8 problem

mabe i got the answer. if use the UTF-8, you may should set the function bind_textdomain_codeset($domain, "UTF-8"), however, on the line 275 in getText.php, it is commented.
if i uncomment it, the problem disappear.