3 ms·
I have also seen a lot of -3, -5, -7. And recently too ;) The others not that much, but not never either. At least I believe I did, because often times you get
by rndgermandude 5y ago
I have also seen a lot of -3, -5, -7. And recently too ;) The others not that much, but not never either.
At least I believe I did, because often times you get that stuff without any hint what it is and then you can make a somewhat educated guess only.
There is still a lot of software out there that doesn't default to unicode but either some of the iso-8859's or some windows code page.
E.g. WordPad in Windows 10 uses the an ANSI code page when saving an .rtf (WordPad default format)[0] or as plain .txt[1]. But fret not if you're on macOS, my TextEdit just saved this when I created a new document and inserted a few ä-s (the TextEdit default is .rtf as well)
>Ohne Titel.rtf: Rich Text Format data, version 1, ANSI, code page 1252
At least .rtf has some embedded metadata specifying the code page of the document and more! Including mixing in some unicode[2].
Why do I mention .rtf? Because there is a lot of .rtf out there, being saved and emailed around each day.
All bets are off for plain text formats that do not come with such useful metadata (except when it's some valid UTF (with BOM)).
There is also a ton of (old) email software/webmailers deployed that do not produce unicode. Some old and/or shitty enough to produce beautiful HTML soup that does not specify any character set at all.
And all kinds of tools that produce text or csv and the like in all kinds of funky encodings that aren't anything unicode and quite often are selected based on the system locale or ANSI code page (on Windows). Or just hardcoded. Or yet better: mixing different encodings in the same file.
Do you want to read the exif metadata your camera embedded into those jpegs it spit out? The standard says everything is 7-bit ASCII, but of course that won't fly, so camera vendors and image editor vendors started using all kinds of encodings. And then there are vendor-specific additional tags. Windows XP's photo editor e.g. managed to smuggle in a creator tag that embeds the name of the user account which created/edited a file and it's using UCS-2/WTF-16, of course!
[0] To be fair, the format was specified long before there was unicode. To be even fairer, it's all 7-bit ASCII with escaped 8-bit whatever-codepage.
[1] There is an "Unicode text file" format option, which, you guessed it, saves it as... maybe WTF-16, maybe UCS-2, maybe UTF-16, not entirely sure, didn't check.
[2] If you need unicode, then the .rtf format lets you embed escaped unicode sequences inside the ANSI code page document :P