Re: [web-nfc] What's the value of `toJSON()`? (#366)

OK I think I understand the UTF-16 more or less now. NFC only writes in big endian. When you write the BOM you always write 0xFEFF and that gets swapped if the decoder and encoder have different endianess.

So this works fine on my little endian machine:

![image](https://user-images.githubusercontent.com/1101339/66894572-13366700-eff1-11e9-8faa-e0817e93829a.png)

Guess that means that we should always use "utf-16be" and write that as the encoding when we detect utf-16. 

-- 
GitHub Notification of comment by kenchris
Please view or discuss this issue at https://github.com/w3c/web-nfc/issues/366#issuecomment-542547398 using your GitHub account

Received on Wednesday, 16 October 2019 06:44:45 UTC