Consultor Eletrônico



Kbase P157388: How can I detect the character encoding of a text file?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   15/12/2009
Status: Unverified

GOAL:

How can I detect the character encoding of a text file?

GOAL:

How can I detect the codepage of a text file?

FACT(s) (Environment):

OpenEdge 10.x
All Supported Operating Systems
Apart from Unicode-encoded text where a 2-byte signature (BOM) is inserted at the beginning of the file, it is not possible to detect the character encoding of text file on a trivial manner.
Heuristics and statistical analysis then become then the only option to attempt to determine the codepage of a text file.