The String::NewSymbol(const char*, int) takes a utf-8 encoded string like the String::New(const char*, int), so you will need to encode your Unicode string into utf-8.
Regards, Søren On Sun, Jan 2, 2011 at 18:01, JBaron <[email protected]> wrote: > After recently got a better understanding of how property setters and > getters work within V8 (thanks to this list), I thought it might be a > good idea to revise a XML/HTML5 parser I created some time ago. > > When the parser returns an attribute name to the JavaScript > environment I used code like this to fill an array: > > result2->Set(counter++,String::New(&sc->value2[0])); > > result2 being an simple Array::New() and sc->value2 a standard C++ > Vector of the type uint16_t. So straight forward returning an array > with some strings supporting unicode. So I thought I just change > String::New to String::NewSymbol and I'm done. However I found out > that the NewSymbol constructor doesn't support uint16_t. > > Does anyone know how do I create a "unicode" capable symbol? > > Thanks in advance!!! > > regards, > > Peter > > -- > v8-users mailing list > [email protected] > http://groups.google.com/group/v8-users > -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
