3 ms·
> what encoding is it in? UTF-8. Unless you've got clear directions that it needs to be something else, the correct choice is always UTF-8. Stop emitting thing
by tialaramex 4y ago
> what encoding is it in?
UTF-8. Unless you've got clear directions that it needs to be something else, the correct choice is always UTF-8. Stop emitting things in other encodings, "Doctor it hurts when I stab myself with this knife". Yes it does, so don't.
- throwaway09223 4y agoThat's a great guess, but my point is that it's a guess. It will sometimes be wrong, and when the guess is wrong you will have articles like the above written complaining about the fallout. These types of errors are guaranteed specifically because of the policy of guessing and loose heuristics you're describing.
- GoblinSlayer 4y agoUnicode fixes it. It's why legacy encodings are unworkable.
- throwaway09223 4y agoUnicode absolutely does not fix the issue of not knowing the encoding of a legacy byte buffer with text in it.