here`s my code:

using namespace v8;
int _tmain(int argc, _TCHAR* argv[])
{
        HandleScope handle_scope;

        Persistent<Context> context = Context::New();

        Context::Scope context_scope(context);

        Handle<String> source = String::New("'你好'+',世界!'");

        Handle<Script> script = Script::Compile(source);

        Handle<Value> result = script->Run();

        context.Dispose();

        String::Utf8Value str(result);
        printf("%s\n", *str);

        getchar();
        return 0;
}

and here`s the output:
锟斤拷锟斤拷锟斤拷锟斤拷锟界!

am i did something wrong?
or there`re some workarounds needed to enable the unicode string?
i cant understand it at all,i googled over the net but the keywords
"v8" "unicode" does not work much. plz help!
thanks!
--~--~---------~--~----~------------~-------~--~----~
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to