Hacker News new | ask | show | jobs
by lmm 2343 days ago
UTF-16 is not "just bytes". There are sequences of bytes that are not valid UTF-16, so if you want to roundtrip bytes through UTF-16 you have to do something smarter than just pretending the byte sequence is UTF-16.
1 comments

Sorry, I wasn't trying to imply that any permutation of bytes would work. If you encode it improperly, it's not going to work.