[Lazarus] String vs WideString
Michael Schnell
mschnell at lumino.de
Tue Aug 15 14:30:40 CEST 2017
On 15.08.2017 11:15, Tony Whyman via Lazarus wrote:
>
> 3. The problem with string handling today is that it is not based on a
> consistent approach to the character type.
>
> If you clean up character handling then the model for string
> handling should become obvious. A string is after all no more than
> a container for a character array and which should be constrained
> to have the same character encoding. A string should intuitively
> represent a string of text regardless of how many bytes are used
> to represent each character and with dynamic attributes to tell
> you how it is encoded.
>
>
> 4. FPC should clean up Delphi's mess for it. If a unified string type
> follows a consistent model then it should be possible to make all
> Delphi string types synonyms.
>
> You will need to allow exceptions for legacy programs that insist
> on manipulating the bytes themselves - but that is not rocket
> science. There is also the issue of the Windows API and its
> insistence on Wide Strings - but isn't that why calling
> conventions such as cdecl and stdcall exist - to tell the compiler
> when it needs to reformat the call for a given API convention.
>
>
see ->
http://wiki.freepascal.org/not_Delphi_compatible_enhancement_for_Unicode_Support
-Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170815/a2e34a24/attachment.html>
More information about the Lazarus
mailing list