On 2016-10-17 14:14, Marcos Douglas B. Santos wrote: > My system are receiving some files and I don't know the encoding. > I would like to know and then, convert it.
No such function [with exact results] exists anywhere (no matter the programming language). The best programs can do is to interrogate the contents of a file and make a best guess. How they do that interrogation -- I unfortunately don't know. I guess you could look at the source code of some of the open source text editors and see what they do. Some text editors are much better than others. eg: EditPad Pro (commercial) and jEdit (open source) are very good at these interrogations. Alternatively, simply ask the person that supplies you with these files to tell you want encoding they use. They must know the answer. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal