Closed andrewrk closed 11 years ago
Before using the ucs2
string stuff, we reverse the byte order. It's cheap and (as far as I know) accurate. See the mcstring16
methods on both the parser and serialiser.
Sorry, I didn't realize that.
No problem! I'm happy someone is looking over the code, I'm sure there's a bunch of unclear/questionable things in there. :)
According to wiki.vg strings are UCS-2 big endian.
jsmc uses the buffer api
ucs2
which is an alias toutf16le
.Iconv can do the necessary conversions.