lazutf8: prevent string codepage change

git-svn-id: trunk@35408 -
This commit is contained in:
paul 2012-02-17 06:14:40 +00:00
parent f290e72cdc
commit 76b34a64d8

View File

@ -176,7 +176,14 @@ end;
function SysToUTF8(const s: string): string;
begin
if NeedRTLAnsi and (not IsASCII(s)) then
Result:=AnsiToUTF8(s)
begin
Result:=AnsiToUTF8(s);
{$ifdef FPC_HAS_CPSTRING}
// prevent UTF8 codepage appear in the strings - we don't need codepage
// conversion magic in LCL code
SetCodePage(RawByteString(Result), StringCodePage(s), False);
{$endif}
end
else
Result:=s;
end;