Elektrine lite

← Feed

@gloriouscow@oldbytes.space

Post #4440726

2026-08-07 20:30 UTC

UTF-16 has issues with endianness. You have to specify if your UTF-16 encoded document is big or little endian, which you do with a Byte Order Mark or BOM, of 2-3 bytes. FE FF - Big Endian FF FE - Little Endian EF BB BF - UTF-8 UTF-8 has no endian concerns so the UTF-8 BOM has little purpose I can see other than to annoy you when you're trying to read CSVs with Python

Replies (1)

  • @gloriouscow@oldbytes.space 2026-08-07 20:32

    We want our UTF-16 to be big endian, I think, which means our document would start with FE FF. That's an invalid opcode. But what does it do on an 8088? It does push bh, but as an 8-bit operation. Yes, you can push a single byte to the stack on an 8088. The stack pointer still advances by 2, though. Unfortunately there's no 8-bit pop.

    Open ##4440725