[fpc-devel] UnicodeString and RTL

Graeme Geldenhuys graemeg.lists at gmail.com
Thu Nov 20 15:59:04 CET 2008


On Thu, Nov 20, 2008 at 4:46 PM, Michael Schnell <mschnell at lumino.de> wrote:
>
> UTF8 _is_ a Unicode coding and thus UTF8String _should_be_ a Unicode String
> type (of course it is not in the current implementation, as the compiler
> can't tell it from ANSIString, but that is exactly what we are discussing
> right now.) If UTF8String is not a Unicode type there is no right for it to
> exist.

Well at the moment, UnicodeString (the type in FPC 2.3.1) is a UTF-16
type, not a UTF-8 type. So while FPC doesn't have a native UTF8 type,
I'll start implementing the UTF-16 version using UnicodeString type.

UTF8String is not an actual type, but rather just an alias to String
type or AnsiString type. Like you said, the compiler doesn't
distinguishes between those.

I'm not arguing, I'm simply interested in getting the ball rolling
with improved Unicode support. Even if that means only having UTF-16
support at the moment. And with my current FPC knowledge that limits
me to the RTL only, I don't have the knowledge to implement native
UTF-8 types in FPC - that's a job for Florian or somebody else with
better knowledge of compiler internals.


Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/



More information about the fpc-devel mailing list