On Sun, Apr 25, 2010 at 10:55 PM, Oscar Rodriguez <
[email protected]> wrote:

> Another problem what i'm facing is when i create a new v8::String
> Object from C++ with the Latin-1 encoding, becoming the resulting
> string corrupted.
> If i translate it to UTF-8 before the creation, the new v8::String is
> OK; but if i don't do that, it returns a bad Unicode charecter.
>

i believe that is so. Here is a link to an older discussion about the topic:

http://groups.google.com/group/v8-users/browse_thread/thread/1621beb71d65e6fa/2883be6ddd10cddd

Short summary: if v8 sees chars with values >127 it assumes UTF8 and assumes
the UTF8 is valid. At least, that's what was communicated in the above
thread:

"So it will assume that it is UTF-8 if it is not ASCII.  Not all
binary sequences
are valid UTF-8 so you can't use this for binary data. Internally, V8 does
not use UTF-8 so this data will be converted to UC16. "

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/

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

Reply via email to