[fpc-devel] Unit for handling UTF-8 strings

Paul Ishenin ip at kmiac.ru
Tue Apr 9 09:20:41 CEST 2013


09.04.2013 15:13, Mattias Gaertner wrote:

> Will there be UTF-8 functions too or do you have to convert
> to UnicodeString?

At the moment TCharacter contains methods which delphi TCharacter has. 
If there is demand we will add UTF8 overloads.

> Will there be PUnicodeChar functions too?
>
>>    // flat functions
>>     function ConvertFromUtf32(AChar : UCS4Char) : UnicodeString;
>>     function ConvertToUtf32(const AString : UnicodeString; AIndex : Integer) : UCS4Char; overload;
>>     function ConvertToUtf32(const AString : UnicodeString; AIndex : Integer; out ACharLength : Integer) : UCS4Char; overload;
>>     function ConvertToUtf32(const AHighSurrogate, ALowSurrogate : UnicodeChar) : UCS4Char; overload;

Best regards,
Paul Ishenin





More information about the fpc-devel mailing list