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

Trying to explain endianess for the spec:

The byte order of NDEF is big endian, which means that everything is read back as big endian. For UTF-16, byte order matters as it might differ between reading and writing. For this reason UTF-16 usually has a byte order mark (BOM) which is 0xFEFF, meaning that if the byte order differs between host machine and NDEF, then the value will be read back as 0xFFFE indicating that the byte order should be swapped. In the case that no BOM is present, UTF-16BE (big endian) encoding should be assumed.

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

Received on Wednesday, 16 October 2019 07:06:22 UTC