[fpc-pascal] How to know the encoding of a string?

Jonas Maebe jonas.maebe at elis.ugent.be
Mon Oct 17 15:19:51 CEST 2016


Marcos Douglas B. Santos wrote:
> Is there a way to know what encoding was used at a string?
> 
> My system are receiving some files and I don't know the encoding.
> I would like to know and then, convert it.

There are some heuristics you could try to apply (see e.g.
http://chsdet.sourceforge.net ), but in general it is impossible to know
for sure what encoding has been used.


Jonas



More information about the fpc-pascal mailing list