Guess character encoding of a string.
The returned encoding can be used with other functions of this unit. GuessEncoding uses some heuristics to find out a good encoding. For example it checks for magic numbers like utf BOM. Next it checks if it could be UTF-8. Finally it returns the system encoding. This function can be used to find the encoding of text files.
Converts the character encoding of a string
ConvertEncoding uses for the basic encodings the built in functions. For other encodings it uses the functions of the operating system. For example iconv under Linux.
Returns the common text encoding of the current operating system.
At the moment it gives: Under Windows it returns the windows codepage. Under Darwin (Mac OS X) it returns UTF-8. Under all other Unix (e.g. Linux, BSD, Solaris) it uses the environment variables LC_LANG, LC_MESSAGE, and LANG. This is nowadays typically UTF-8.
Trims, shorten and lower case the given encoding
Fills the list with all basic encodings
It does not add all encodings that are supported by the operating system. For example iconv under Linux supports hundreds of encodings.