Am 26.12.2013 12:30 schrieb "Hans-Peter Diettrich" <[email protected]>:
>
> Sven Barth schrieb:
>>
>> Am 26.12.2013 02:19 schrieb "Hans-Peter Diettrich" 
>> <[email protected]<mailto:
[email protected]>>:
> Please specify "AnsiString", of which encoding?
>
> When I concat an AnsiString and an UTF8String and assign it to an
OEMString
>   o := a + u;
> then I get these warnings in XE:
>
> [DCC Warning] ConcTest.dpr(20): W1057 Implicit string cast from
'AnsiString' to 'string'
> [DCC Warning] ConcTest.dpr(20): W1057 Implicit string cast from
'UTF8String' to 'string'
> [DCC Warning] ConcTest.dpr(20): W1058 Implicit string cast with potential
data loss from 'string' to 'OEMString'
>
> I cannot see the system codepage used here.

Try to make o of type RawByteString. And maybe also use more than two
strings.

>
>
> What I want to point out are the string function overloads, where Delphi
supplies only string (UTF-16) and RawByteString arguments, and
AnsiString(CP_ACP) in unit AnsiStrings. FPC could add UTF8String overloads
and use these when dealing with AnsiStrings of an encoding different from
CP_ACP.

That was already discussed some time ago between devs and was deemed not
useable by Jonas. I'll try to find his mail with his explanation.

Regards,
Sven
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to