[fpc-devel] WideString vs UnicodeString / len in char vs byte / *nix vs windows

Sven Barth pascaldragon at googlemail.com
Thu Apr 25 17:07:10 CEST 2019


Am 25.04.2019 um 15:41 schrieb Martin:
> Looking at https://bugs.freepascal.org/view.php?id=35359
> and the latest comments (see end of mail)
>
> Is it correct, that "widestring" here has 2 meanings?
> - the "widestring" that has length in bytes (windows bstr)
> - "widestring" as a typename / alias
>
> And apparently then on *nix, "widestring" is just an alias (to 
> unicodestring).
> So using the type with the name of "widestring" on *nix will compile 
> to a type that has length in chars?
>
> At least my test app, seems to imply this.
Correct. On non-Windows platforms WideString is always an alias to 
UnicodeString. The distinctive WideString type only exists on Windows 
platforms as it relies on Windows specific functionality.

Regards,
Sven



More information about the fpc-devel mailing list