[fpc-pascal] RTL and Unicode Strings

Michael Van Canneyt michael at freepascal.org
Wed May 11 13:48:59 CEST 2016



On Wed, 11 May 2016, Graeme Geldenhuys wrote:

> On 2016-05-11 10:48, Michael Van Canneyt wrote:
>> Honestly, I don't understand this preoccupation with {$modeswitch  unicodestrings}
>>
>> It just means that
>>
>> Var
>>   a : string;
>>
>> is read by the compiler as
>>
>> Var
>>   a : unicodestring;
>>
>> No more, no less.
>
>
> It saves you from data loss in the case where you use units that use the
> String data type and assign Unicode data to it -- and you run your
> program on a system where the locale is not UTF-8 or UTF-16. eg: Latin-1.

No, it does not save you, where did you get that from ?

Michael.



More information about the fpc-pascal mailing list