if you run the same code using a text file the ???? start to appear. (Try a Lithuanian encoding - windows-1257 - still western, but with some twists in decoration, see Marco's remark - , or KOI-8, with which many forum users are familiar with)
It is still a very useful function, but not perfect. But it is actually short and pretty concise, which I like, except for Lithuanian.... so I have to read my wife's letters by guessing the question marks...
Lithuanian CharSet Converter v.2.0
(free open-source cross-platform software)
Before UTF-8 character encoding adoption, Lithuanians had used different character encodings which were incompatible between each other.
“Lithuanian charset converter” converts between legacy character encodings and modern UTF-8.
“Lithuanian charset converter” converts between:
• ASCII;
• 772 / Lithuanian Standard LST 1284:1993 (Lithuanian and Russian characters) ; 774 / Lithuanian Standard LST 1283:1993 (Lithuanian and English characters) ; 775 (Microsoft);
• 770 / IBM Baltic / Lithuanian Standard RST 1095-89;
• 771 / KBL / Baltic Amadeus (Lithuanian and Russian characters) ; 773 Lithuanian (mix of 771 and 775);
• Windows-1257 / IBM Baltic RIM ; Latin-7 / ISO-8859-13;
• Latin-4 / ISO-8859-4 ; Latin-6 / ISO-8859-10;
• UTF-8 BOM (byte order mark);
• UTF-8.
LAMW source code for Android:
http://cognaxon.com/downloads/LithuanianCharSetConverter/SourceCode/LithuanianCharSetConverter_Lazarus_Android.zipLazarus source code for Linux, Windows, macOS:
http://cognaxon.com/downloads/LithuanianCharSetConverter/SourceCode/LithuanianCharSetConverter_Lazarus.tar.gz