On May 17, 10:50 pm, austincheney <[email protected]> wrote: > > Now, if I look at the responseText with e.g. string.charCodeAt(), > > instead of seeing a series of UTF-8 bytes, I see a series of (large) > > unicode values which correspond to the Chinese characters displayed. > > Could you more specifically define your use of "Unicode"? UTF-8 is a > subset, among several others, of the Unicode character collection. > Could you be referring to something like UTF-16LE?
You mean my use of the phrases "Unicode" and "UTF-8"? Well, I have this byte sequence in the SQLite database: E8 90 A5. This is a valid 3-byte UTF-8 character, the second Chinese character in the stream. When I look at this (using alert) on the browser side, I get the decimal value 33829 (8425 hex). If I look here: http://www.utf8-chartable.de/unicode-utf8-table.pl?start=33280&number=1024 and scroll down to 8425, I see the UTF-8 sequence I gave above. The 3-byte UTF-8 sequence is sent using the PHP echo statement as part of the ajax response. By the time I'm looking at it using alert in the JavaScript, a conversion appears to have occurred. -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/[email protected]/ To search via a non-Google archive, visit here: http://www.mail-archive.com/[email protected]/ To unsubscribe from this group, send email to [email protected]
