Template talk:BOM
Jump to navigation
Jump to search
BOM
I think it should say 0xFEFF and not 0xFE, 0xFF. The key is to see those bytes as a UInt16/u16, not as a byte[], so if you read 0xFEFF (as a UInt16) you have the correct endianess. But 0xFE, 0xFF makes it look like the key is a byte[], but it's not.
--Wexos (Talk | Contribs) 08:47, 10 December 2016 (UTC)
- Agreed. Waiting for Wiimm to confirm it. —Atlas (talk) 12:00, 10 December 2016 (UTC)
- Clearly NO. The value of BOM is always 0xfeff for both, little and big endian. But in BE it stored as bytes FE,FF and in LE as FF,FE.
- Or in other words: Bytes FE,FF indicate BE, because BE interpretation is feff. Bytes FF,FE indicate LE, because LE interpretation is also feff. If a tool reads another value tahen feff (and especially fffe), it uses the wrong endian.
- Hope I described it clearly. -- Wiimm (talk) 14:55, 10 December 2016 (UTC)
- Another comment could be: The value is always 0xfeff. If value 0xfffe is read, the false endian is used.
- -- Wiimm (talk) 14:17, 11 December 2016 (UTC)
- Does it mean that there can't be files using Little Endian in MKWii at least? —Atlas (talk) 21:30, 11 December 2016 (UTC)
Link to Endian
I know there is already a link to that page in the template, but I think it would be more newbie-friendly (or, at least, more me-friendly) to put another link to that page, like so:
Byte order mark (BOM): The value is always 0xFEFF. If value 0xFFFE is read, then the false endian is used. MKWii uses nearly always big endian (bytes 0xFE,0xFF).