CodeIgniter Forums
Codeigniter connect with mssql, all chinese become question marks. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Codeigniter connect with mssql, all chinese become question marks. (/thread-54693.html)



Codeigniter connect with mssql, all chinese become question marks. - El Forum - 09-20-2012

[eluser]CyrusTC[/eluser]
Hi all,

I am new to codeigniter.

Inside my database.php, i have the following setting
Code:
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
and chinese fields inside my sql server, collate is set as "Chinese_Taiwan_Stroke_CI_AI"
and also i have tried the following setting
Code:
$db['authsvr']['dbcollat'] = 'Chinese_Taiwan_Stroke_CI_AI';
$db['authsvr']['char_set'] = 'big5';

However, both of the above setting will lead all chinese characters become question marks.
I tried the function mb_detect_encoding() to see the result, it return ASCII for that "question mark" string.
Code:
name: ???->ASCII
My files and output are as UTF-8
Is there any idea to figure out the problem?


Thanks for all help.