TEncoding is a class that defines a specific encoding for a character or string.
Use the TEncoding class to define a specific encoding desired for a given string. For instance, the TStringStream class now includes an overloaded constructor that enables the developer to define encoding for strings that will be added to an instance of TStringStream.
To simplify cross platform developement, there are similarities between this interface and System.Text.Encoding. For that reason, links are provided to MSDN counterparts in Encoding (MSDN) class.
This example reads any file and converts the encoding to UTF8.
instances.
// Sample to convert a file of any encoding to UTF8.
return 1; // Unknown encoding, don't convert.
and a combobox.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!
