protobufjs / bytebuffer.js

A fast and complete ByteBuffer implementation using either ArrayBuffers in the browser or Buffers under node.js.
http://dcode.io
Apache License 2.0
719 stars 154 forks source link

UTF16 Buffer #62

Open dimitrirostavo opened 8 years ago

dimitrirostavo commented 8 years ago

Is there a way in ByteBuffer I can create a UTF16 string from a UTF8 string ? Would really help me a lot.

Thanks!

dcodeIO commented 8 years ago

ByteBuffer stores strings as UTF8 bytes by default, but returns these as a standard JavaScript string, which is UTF16 basically. Do you need UTF16 bytes?

dimitrirostavo commented 8 years ago

Thank you so much for your reply. Yea, I am looking for UTF16LE Byte representation of a JavaScript string.