Please help me on the unicode.
Posted: Fri Oct 12, 2007 3:32 am
Hi all,
I've been working on a php which supposes to fetch data from the MSSQL and return the data on the html. The data contains Chinese characters.
I have tried so hard to make the chinese characters display right. But it only shows me '????????' etc.
I've set the content-type and header(), use CONVERT(nvarchar...) in the select statement. But they are not working to me.
How can I know what kind of code (UTF-8 or BIG5 or something else) does store in the DB? The datatype of the field is nvarchar. Is it definitely UTF-8? When I use ord($vendor_name), the return value is 63 which is '?' in the ASCII table. Is that meant the data is not correctly fetched from the MSSQL?
What is next I can do? I am so desperate on this. Please help.
Thanks.
Dave
I've been working on a php which supposes to fetch data from the MSSQL and return the data on the html. The data contains Chinese characters.
I have tried so hard to make the chinese characters display right. But it only shows me '????????' etc.
I've set the content-type and header(), use CONVERT(nvarchar...) in the select statement. But they are not working to me.
How can I know what kind of code (UTF-8 or BIG5 or something else) does store in the DB? The datatype of the field is nvarchar. Is it definitely UTF-8? When I use ord($vendor_name), the return value is 63 which is '?' in the ASCII table. Is that meant the data is not correctly fetched from the MSSQL?
What is next I can do? I am so desperate on this. Please help.
Thanks.
Dave