TooTallNate / ref

Turn Buffer instances into "pointers"
http://tootallnate.github.com/ref
453 stars 141 forks source link

Utf8String is actually an AsciiString/CString #5

Closed eddyb closed 12 years ago

eddyb commented 12 years ago

The Utf8String type is confusingly named, as it has nothing to do with UTF-8, it's just an ASCII C string. An UTF-8 string would require a more complicated implementation that would also read/write the length of the string.

TooTallNate commented 12 years ago

I'm not totally opposed. I'd probably go with CString. Though node's "utf8" decoding is taking place under the hood ;)