[Lazarus] Removed use of UTF8String in Lazarus to work with cpstrnew

cobines cobines at gmail.com
Tue Sep 20 13:09:18 CEST 2011


2011/9/20 Michael Schnell <mschnell at lumino.de>:
> What do you mean by "map to UTF8" ? AFAIK, there is no string type in FPC
> that decently denotes a dedicated encoding for the content so that library
> functions know how to handle them.

You will be able to alias String for UnicodeString (UTF-16) or
AnsiString(CP_UTF8), and maybe AnsiString(Ansi code page) too, I'm not
sure. And Lazarus will use String=AnsiString(CP_UTF8), from what I
understand.


> If the compiler provides New Strings, it's not a decent way to do a library
> not using them. The end user ("naive" programmer) will use them and thus
> library calls will be problematic.

If you mean UTF-16 UnicodeString then I don't think there will be a
problem. If your program or library uses UTF-16 and Lazarus uses UTF-8
the conversion routines will be inserted automatically by the compiler
where needed.

--
cobines




More information about the Lazarus mailing list