<p>Am 26.12.2013 12:30 schrieb "Hans-Peter Diettrich" <<a href="mailto:DrDiettrich1@aol.com">DrDiettrich1@aol.com</a>>:<br>
><br>
> Sven Barth schrieb:<br>
>><br>
>> Am 26.12.2013 02:19 schrieb "Hans-Peter Diettrich" <<a href="mailto:DrDiettrich1@aol.com">DrDiettrich1@aol.com</a> <mailto:<a href="mailto:DrDiettrich1@aol.com">DrDiettrich1@aol.com</a>>>:<br>
> Please specify "AnsiString", of which encoding?<br>
><br>
> When I concat an AnsiString and an UTF8String and assign it to an OEMString<br>
> o := a + u;<br>
> then I get these warnings in XE:<br>
><br>
> [DCC Warning] ConcTest.dpr(20): W1057 Implicit string cast from 'AnsiString' to 'string'<br>
> [DCC Warning] ConcTest.dpr(20): W1057 Implicit string cast from 'UTF8String' to 'string'<br>
> [DCC Warning] ConcTest.dpr(20): W1058 Implicit string cast with potential data loss from 'string' to 'OEMString'<br>
><br>
> I cannot see the system codepage used here.</p>
<p>Try to make o of type RawByteString. And maybe also use more than two strings.</p>
<p>><br>
><br>
> 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.</p>
<p>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.</p>
<p>Regards,<br>
Sven</p>