[fpc-devel] Unit for handling UTF-8 strings
Mattias Gaertner
nc-gaertnma at netcologne.de
Tue Apr 9 09:13:30 CEST 2013
On Tue, 9 Apr 2013 08:55:15 +0200 (CEST)
Michael Van Canneyt <michael at freepascal.org> wrote:
>
>
> On Tue, 9 Apr 2013, Mattias Gaertner wrote:
>
> > On Tue, 09 Apr 2013 08:24:11 +0200
> > Michael Schnell <mschnell at lumino.de> wrote:
> >
> >> On 04/08/2013 07:02 PM, Mattias Gaertner wrote:
> >>> I guess, you mean encoded string types.
> >>
> >> AFAIK, you can just create string variables of the appropriate coding
> >> type and an assignment will do auto-conversion.
> >
> > Yes.
> > But how do you examine the characters?
> > If I understand Michael right, there will be some "implicit functions"
> > for that. I wonder how they work.
>
> See the character unit:
Nice!
Why do you call them "implicit calls"?
Will there be UTF-8 functions too or do you have to convert
to UnicodeString?
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;
>[...]
Mattias
More information about the fpc-devel
mailing list