[fpc-devel] Warning: Implicit string type conversion
Paul Ishenin
paul.ishenin at gmail.com
Thu Feb 2 13:36:44 CET 2012
02.02.12 19:51, Hans-Peter Diettrich пишет:
> What's the codepage/encoding of AnsiString? Depending on the platform?
DefaultSystemCodePage - this const depends on platform
>> UnicodeString convertions are required when string in one codepage is
>> converted to another or when ansistring is assigned to unicode/wide
>> string type.
>
> In many places I could not find strings of different encoding nor
> unicode/widestrings. That's why I asked for other reasons, which in
> pre-Unicode FPC didn't require any conversion - in these cases it had
> been necessary to convert the strings explicitly, what should be obvious
> in the (old) source code.
>
> Can char or string literals or resource strings cause implicit
> conversions?
Not themself but operations with them.
> What's the encoding of resource strings?
They are still ansistring with compiler codepage (defined by -Fc or
{$codepage}).
In Delphi resourcestrings are unicodestrings but this is not so in FPC
because team still not decided about the default string type.
Best regards,
Paul Ishenin.
More information about the fpc-devel
mailing list