On Mar 9, 1:28 pm, ry <[email protected]> wrote:
> Hi
> I've seen the "Binary data in embedded V8" thread but it is from
> several months ago.
> Is any work being done now to make importation/exportation of binary
> strings possible?
If i'm not mistaken you can stuff binary data into a String by using
the two-arg ctor:
String::New("....",length_of_data);
e.g. over the weekend i wrote an an I/O library (http://
code.google.com/p/v8-juice/wiki/PluginWhio) and i use vector<char> as
my read buffer. Once i've populated it i stuff it into a String with:
String::New( &vec[0], static_cast<int>( vec.size() ) ); // i still
can't believe the second arg is a signed type!!!
that seemed to do the job, and i was reading data with embedded nulls,
and all of them seemed to make it into JS space.
--~--~---------~--~----~------------~-------~--~----~
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
-~----------~----~----~----~------~----~------~--~---