[fpc-pascal] FPC 3: disabling automatic AnsiString codepage conversion

Michael Van Canneyt michael at freepascal.org
Mon Apr 4 11:49:57 CEST 2016



On Mon, 4 Apr 2016, tobiasgiesen at gmail.com wrote:

>>
>>
>> On Mon, 4 Apr 2016, tobiasgiesen at gmail.com wrote:
>>
>>>> Your question was not about Lazarus but maybe you should read this:
>>>>   http://wiki.freepascal.org/Better_Unicode_Support_in_Lazarus
>>>
>>> Very interesting, but apparently there is some wrong info.
>>>
>>> It says "On Linux and Mac OS X UTF-8 is typically the system codepage, so the RTL uses
>>> here by default CP_UTF8."
>>>
>>> Not on my Mac. DefaultSystemCodePage is 20127 before I set it to 65001.
>>>
>>> Should I fix this bit on the documentation page?
>>
>> No. It says 'typically'.
>
> That's the first part of the sentence.
>
> The second part says: "the RTL uses here by default CP_UTF8."
>
> That is wrong. It does not (at least not on Mac). This must be fixed.

Why do you think it is wrong ? 
It is perhaps wrong on your computer. Maybe it checks the environment ?
Did you include clocale ? etc. There are maybe a 100 things that can change
this.

Don't be too hasty in changing things. 
Jonas (who created that page) is usually very careful in such matters.

Michael.



More information about the fpc-pascal mailing list