[Lazarus] String vs WideString

Juha Manninen juha.manninen62 at gmail.com
Mon Aug 14 23:01:55 CEST 2017


On Mon, Aug 14, 2017 at 5:11 PM, Tony Whyman via Lazarus
<lazarus at lists.lazarus-ide.org> wrote:
> Indeed, why isn't there a single container string type for
> all character sets where the encoding whether a legacy code page, UTF8,
> UTF16 or UTF32 is simply a dynamic attribute of the type - a sort of
> extended AnsiString?

As Sven Barth wrote, they have different size of char.

Tony Whyman, this issue has been discussed again and again for the
past 10+ years first in FPC mailing lists and then in Lazarus lists.
The current Unicode support in Lazarus works f***ing well and is
amazingly compatible with Delphi.
WinAPI parameters may require an explicit temporary UnicodeString
variable but even then the code is compatible with Delphi.

Tony Whyman, Marcos Douglas and Michael Schnell, please study the facts.
For starters, this is about the current Unicode support in Lazarus:
  http://wiki.freepascal.org/Unicode_Support_in_Lazarus
I think the dynamic encoding and automatic conversion now work perfectly well.
If you have a piece of code where it does not work, please ask for
detailed info.

Juha


More information about the Lazarus mailing list