[fpc-devel] simple UTF tests
DrDiettrich1 at aol.com
Fri Jan 6 12:07:20 CET 2012
Michael Schnell schrieb:
> On 01/05/2012 04:40 PM, Hans-Peter Diettrich wrote:
>> Which Delphi version supports AnsiString(CP_UTF16)???
> What is the suggested way to handle UTF-16 with Delphi ?
The obvious: in newer versions use String or UnicodeString :-)
Embarcadero discourages the use of AnsiString in newer versions - this
string type should be used only for reading/writing existing data
sources, but the application should use UnicodeStrings internally.
That's okay WRT performance, no further Encoding conversions required.
When FPC implements an really polymorphic string type (of charsize
1..4), the implementors are responsible for all arising problems, like
high runtime and resource overhead, PChar quirks etc. Even if the Delphi
developers initially wanted to support such an string type, they later
came to a strict separation of strings of a different charsize.
More information about the fpc-devel