[fpc-devel] Encoded AnsiString
Jy V
jyv110 at gmail.com
Mon Dec 30 12:53:39 CET 2013
On Sun, Dec 29, 2013 at 7:26 PM, Hans-Peter Diettrich
<DrDiettrich1 at aol.com>wrote:
>
> var a: AnsiString; u: UTF8String;
> function cpy(s: RawByteString):RawByteString;
> begin Result := s; end;
> a := cpy(u); //now a has encoding UTF-8!
>
> Here the XE compiler omits the conversion of the RawByteString result to
> the declared encoding of the target. Dunno about newer versions.
>
A quick note: the new LLVM Delphi compiler forbid the use of AnsiString and
AnsiChar, (declared in the unit AnsiString.pas, you cannot use this unit
anyway),
you will probably choose to hack using MarshaledAString.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20131230/cd8ec202/attachment.html>
More information about the fpc-devel
mailing list