Hacker News new | past | comments | ask | show | jobs | submit login

Yes but UTF-8 with or without byte order mark ? ;-)



Without. BOM (when used for UTF-8) is an obsolete crap invented by necrosoft in order to make their software incompatible with normal.


It's not a Microsoft invention, and MS's use of it is really quite sensible. They had a problem of distinguishing UTF-16, UTF-8 and non-Unicode (possibly a single-byte "extended ASCII" type encoding, possibly some multi-byte monstrosity) text files. Since UTF-8 and ASCII-compatible encodings look similar when there aren't many >U+007F characters in use, and identical if none are in use, they could get confused. Prepending a Byte Order Mark solves this problem, in that it makes a file unambiguously UTF-8 (or UTF-16, for that matter).


How do you have a BOM in the shell?


Some masochist M$-fan could invent even this just in order to justify the difference from civilized world.




Registration is open for Startup School 2019. Classes start July 22nd.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: