Topic: Chinese Characters appear as question marks in FA2 but not FA1

Hi,

I am entering chinese characters into the database. In FA1, they are able to appear properly and entered into the database as chinese characters.

However in FA2, they appear as question marks.

I would appreciate if someone could advise.

Thank you.

Re: Chinese Characters appear as question marks in FA2 but not FA1

Hi guys, problem solved. I'm not sure how but I changed the encoding from Simplified Chinese and Traditional Chinese and it worked. sheesh. I am confused.

Re: Chinese Characters appear as question marks in FA2 but not FA1

Yes, you should probably set the character set to the right one in MySql. Maybe the default en_US-demo.sql is not adequate to start a Chinese client. You should probably create your own script file for this.
If you do, please share it with us smile

/Joe

Re: Chinese Characters appear as question marks in FA2 but not FA1

Hi,

The standard US demo isn't a problem at all as the chinese character set is able to use UTF-8 as well. However, the trick is to use zh_TW instead of zh_HK. Somehow, zh_HK just doesn't work, I am not sure why.

However, coming from a chinese background, both locales are actually using the same language which is traditional chinese, so it shouldn't be a problem. smile

Yoshi Kawasaki
yoshi@opentres.com

Re: Chinese Characters appear as question marks in FA2 but not FA1

Hi,

I have same problem as you. I use zh_HK-utf8.sql to make charts of account.

And also installed the language using Code 'zh_TW' and Encoding 'utf-8'.

All interface is working prefectly with chinese character but only account in combo box is shown as question marks.

Then I go to check my database and make sure it was encoded by 'utf8_unicode_ci'. I am sure that I can see correct chinese characters in phpMyAdmin.

I guess FA didn't encode and decode with correct CODE string 'zh_TW'.

I also found an insteresting thing is that to setup Encoding 'utf8' is differ with 'utf-8'. Even both can make whole interface work without probelm.

But if use 'utf8' , the title of the window is unknown characters, otherwise,use 'utf-8', the title is ok. So, I guess FA support 'utf8' and 'utf-8', but the Apache only support 'utf-8'. 

I found my browser send 'zh-tw' to Apache (using phpinfo.php), so i changed FA CODE to 'zh-tw', but it still no work.

But if I enter the data of account from FA interface, I can read as what I entered, means that I can see correct chinese words. However I can not read it from phpMyAdmin, it is unknown words.

Re: Chinese Characters appear as question marks in FA2 but not FA1

Hello guys,
I'm glad that you have done some research on this. I have no experience in chinese languages. When I prepared the chart of accounts, I used utf-8 from pspad I guess.
Maybe you can change the characters in the chart of accounts to be the right encoding. I have, however, the original charts in the correct characters. So maybe I should use another editor for preparing the charts.
And finally, if any of you can give instructions here to us, so new users can benefit from this, please.
We got the Arabic languages to work smoothly, so we should also solve this smile

/Joe
BTW, please install the cid0 font for Reporting. It reduces PDF filesize enormously.

Re: Chinese Characters appear as question marks in FA2 but not FA1

I have solved the problem. Easy yo do.

Just edit includes/current_user.inc,

in get_db_connection(),

find then sentence as below:
       $db = mysql_connect($connection["host"] ,
            $connection["dbuser"], $connection["dbpassword"]);

follow the sentence, add a line as below:
         mysql_query("SET NAMES 'utf8'");

and then save it.

Ok, now the sql connection is working under encoding 'utf8'