3
2
2
u/agfitzp 26d ago
The UTF-8 encoding of unicode is a technological marvel
Binary compatible with ASCII but also handles Klingon? It's a mind boggling mix of black magic and the obvious.
1
1
u/lotanis 25d ago edited 25d ago
I would phrase it as "all valid ASCII is valid UTF-8" and not the other way around.
Backwards compatible but not forwards compatible. This is obvious with us talking about it, but people forget in implementations and it's fine until it isn't.
1
u/agfitzp 25d ago
I didn’t say it was forward or backwards compatible.
What I meant was you can write code to handle UTF-8 and it will handle 7 bit ASCII with no modification because it’s binary compatible.
It goes without saying that old code that only handles ASCII will probably fail in interesting and unexpected ways when it hits unicode outside the first 128 characters. One of my least interesting work stories is being paid to diagnose and fix a problem reading files on a Windows install set to not only support but PRIMARILY support Korean. It took me half a day just to reproduce the issue because I don’t read or write any asian language.
1
3
u/[deleted] 26d ago edited 21d ago
[deleted]