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

Michael Schnell mschnell at lumino.de
Tue Sep 20 11:56:35 CEST 2011


On 09/20/2011 11:09 AM, Luiz Americo Pereira Camara wrote:
>
> Nope. AFAIK String type will automatically map to UTF8 or UTF16 string
> depending of a compiler switch or directive and the RTL used (UTF8,
> UTF16).
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.
> No need to "LazarusString". The unicode indenpendent code
If Unicode is possible at all there is no "Unicode independent code"as a 
user input can contain non-ASCII-characters
> (most of it) will not need to be changed, just the code that
> interfaces with RTL. Probably some string handling like CodeTools and
> SynEdit will need to be updated also
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.

-Michael





More information about the Lazarus mailing list