Hi Im in a little bit pin here
I use charset utf-8 for my web apps set it in the <meta> tag.
I try querying the user info in the database and it return ok -- all the character return correctly, all the username are in chinese
So next move is user filter using ajax -- I use prototypejs
The return result from ajax display different character and unreadable.
I check using Firebug Console -- Header , Post, and Response -- doesn't show any error especially in response text all the chinese character all still intact. But in the browser the chinese character return alot of small box question mark etc.
I already add charset element in the <script> tag of my ajax code.
Any solution for this ? It seems javascript doesn't recognize the chinese character returned from php.
===============================================================================
I'm using MS Access -- cause of hardware restriction
Windows XP with WAMP
PHP 5.3
This problem doesn't appear if I use MySQL which support UTF-8 but because of hardware and system problem I can only use MS Access.
===============================================================================
[SOLVED] avascript Ajax showing Unicode
Moderator: General Moderators
[SOLVED] avascript Ajax showing Unicode
Last edited by wpsd2006 on Thu Mar 11, 2010 6:33 am, edited 2 times in total.
Re: Javascript Ajax showing Unicode
One more info I'm developing the code in Ubuntu and Geany then sync it to the XP machine so it should be save as UTF8
Re: Javascript Ajax showing Unicode
Solved it
Just like other people suggested ( it's all in google
)
The one that return by printing or echo after ajax call ( here is .php file )
add the header charset on top of it
For chinese and if u use access or mssql like use gb2312
Just like other people suggested ( it's all in google
The one that return by printing or echo after ajax call ( here is .php file )
add the header charset on top of it
For chinese and if u use access or mssql like use gb2312