Comment #1 on issue 292 by erik.corry: How to use other character sets (GB  
or BIG5 or UTF-8 or unicode... )?
http://code.google.com/p/v8/issues/detail?id=292

JavaScript only supports Unicode-based character encoding, so you will have  
to convert to and from Unicode
in your C++ code.  There is full support for the basic plane (16 bit) of  
Unicode.  UTF-16 is 20 bit Unicode with
encoding in pairs of 16 bit words.  UTF-16 is supported in the sense that  
UTF-16 is passed unharmed
through JavaScript, but many operations in the language (substring, string  
length) etc. will treat the individual
UTF-16 code points as separate characters.  I think V8 matches the  
ECMAScript spec and other
implementations on this point - I'd be interested to hear of deviations.

If you don't want to use the UTF-8 encoding in C++ there are UTF-16  
equivalent to most calls, eg one of the
overloaded String::Write methods, the UTF-16 version of String::New and the  
Value(), not UTF8Value() method
on String.


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to