[Lazarus] TStringList.LoadFromFile encoding parameter

Michael Schnell mschnell at lumino.de
Mon Jul 11 13:55:15 CEST 2016


On 07/11/2016 01:01 PM, Michael Van Canneyt wrote:
>>
>> Now Lazarus seems to set the compiler to by default handle strings as 
>> UTF-8 coded.
>
> Not the compiler, the RTL.

... by setting a system variable.

So simply avoiding to do this (and use the locale ANSI setting) would 
make Lazarus (user code) Unicode - unaware and hence avoid such problems 
with 99 % of the applications, while of course the 1 % of the 
applications that in fact do need Unicode handling would not work in 
that mode (but maybe could be configured to use a "Unicode mode", if 
they don't want to define their Unicode aware string variables 
explicitly ) ???

(Of course conversion to/from Unicode in the LCL-interface for GUI calls 
might cost some addition CPU cycles.)

-Michael


More information about the Lazarus mailing list