[fpc-devel] Unicode support (again)

Michael Schnell mschnell at lumino.de
Wed Nov 12 09:40:02 CET 2008


> - widestrings had some bugs at the time and were not reference counted
> (Martin did a great job over the years to improve that)
>   
Of course this is a serious argument. I feel that any decent string type 
(but pchar :) ) needs to be reference counting. In my "suggestion" mail 
10 minutes ago in this thread I presumed the UTF16String and UCS2String 
types to be reference counting. Is the infrastructure for this already 
in place ?

> Speaking for myself: I'm glad for the decision for UTF-8. So far I had
> much more problems with widestrings than with UTF-8 ansistrings.
>   
OK. I fully accept this argument. That is why I vote for having the 
compiler do decent automatic conversion between all possible string 
types (even if "lossy" when converting to ANSI). This would allow for 
any kind of API for LCL. (maybe some overloaded functions need to be 
provided).
> Of course, I expect that the pressure for D2009 compatibility rises.
>   
Of course FPC and Lazarus need to provide a Delphi 2009 compatible mode. 
I suppose we agree that the D2009 way of string handling is not the best 
possible (at least not for all users/projects). So I vote for providing 
the appropriate compiler switches.

-Michael



More information about the fpc-devel mailing list