On 2014/01/04 15:56:45, dcarney wrote:
Just a preliminary glance. What you're doing is okay, but all other callsites
of Utf8::Encode would have to change and have the separated logic for
rewriting
the surrogates, which is probably not what you want.

Running `git grep 'Utf8::Encode'` shows 4 additional call sites, and yes, it was my plan to change them. IMO Utf8::Encode should convert unicode code points into the UTF-8 encoding. It should not be concerned with UTF-16 surrogates beyond the
fact that they are invalid code points inside a UTF-8 stream.

I mean I can completely see the argument for putting more UTF-16 awareness into v8's UTF-8 encoder given that JavaScript strings are made up from 16Bit units, but I think separation of concerns should be the more heavily weighted argument
here.

Also, you should always run test-api/Utf16. Since it's handling a lot of edge
cases you want to consider.

Thanks. Will do!

https://codereview.chromium.org/121173009/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to