hie....

my question is that i have to let the user to input chinese characters from the text box through ajax request and then save in database.
when i trying to save the data into database, it save all the chinese characters in a series of question marks(??????). this thing is happen when i use GET method in my ajax request.

after few attempt, i try to use POST method in the ajax request and it seem can save the chinese characters. but.....now the problem is....when i type in "午 安GOOD AFTERNOON" tis two words, it trim my space between this two words and save the 午安 (GOODAFTERNOON) (without space) into database. chinese or english characters also same..(i didnt put in any triming space code)

can anyone tell me that what is this problem and how to solve it? plz help.


p/s: using asp + ajax

please help
thanks in advance

Your best bet would be to intercept the point in the data flow which is causing this behavior. Before sending the Ajax request, do an alert and see whether is it an issue with the data being passed to the server. Try logging the data received at the server to see if it is an issue when transmitting data over the wire and / or incorrect encoding used. And lastly, log the data before being inserted into the database, which might bring out issues with data processing.

Without looking at the code, it would be difficult to come to a conclusion. After all, it might be a problem with the server side processing code which might require you to post the same question along with the ASP code in the ASP forum.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.