[Lazarus] Feature Request: Insert {codepage UTF8} per default

Martin Schreiber mse00000 at gmail.com
Wed Mar 30 10:58:59 CEST 2016

On Wednesday 30 March 2016 10:13:36 Juha Manninen wrote:

> With Unicodestring we don't need to care about backwards compatibility
> really because it is so new type.


WideString has been introduced in Delphi 4 IIRC, FPC had an on all platforms 
reference counted 16-bit string which worked like current UnicodeString. IIRC 
it was about version 1.8 when FPC introduced this string type.
Kylix WideString (Linux) also was reference counted.
Later FPC changed WideString on Windows ( against my strong opposition, 
well-understood ;-)  ) to the not reference counted OLE-string.
A little bit later FPC added the on all platforms reference counted 
UnicodeString again.
So one can say that at the moment when Lazarus became Unicode capable there 
was a UnicodeString-like stringtype available in FPC. It was very buggy, so 
probably this was one of the reasons that Lazarus used utf-8 in AnsiString 
For MSEgui on the other hand I used WideString/UnicodeString from beginning 
and wrote FPC bug-reports until FPC WideString became production ready.

> What more, Unicodestring is not needed often when using our new Unicode
> system.
If one wants to handle BMP-chars comfortably and with good performance one has 
to convert from utf-8 in AnsiString to UnicodeString first.


More information about the Lazarus mailing list