[fpc-pascal] FPC 3 regression: cannot use TStringList for UTF-8 data any more?
Michael Van Canneyt
michael at freepascal.org
Thu Apr 14 08:52:16 CEST 2016
On Wed, 13 Apr 2016, Michael Schnell wrote:
> On 04/13/2016 09:04 AM, Michael Van Canneyt wrote:
>> It uses the DefaultSystemcodepage. If the system codepage is UTF8, then
>> it will use UTF8.
>>
> (Sorry for replying yet another answer to the same message of yours)
>
>
> http://wiki.freepascal.org/Better_Unicode_Support_in_Lazarus says:
>> On the other hand a *String* is assumed at compile time to have
>> /DefaultSystemCodePage/ (CP_ACP). /DefaultSystemCodePage/ is defined at run
>> time, so the compiler conservatively assumes that /String/ and /UTF8String/
>> have different encodings.
>
> So I was wrong assuming from your message that DefaultSystemcodepage is the
> default encoding for the type "String" (and with that for TStrings and with
> that for TSringList).
>
> Now I still don't know whether/how the default encoding for the type "String
> (which I still assume is defined when building the compiler)
Your assumption is wrong.
The default encoding for the string type is determined at run-time, not at compile time.
Michael.
More information about the fpc-pascal
mailing list