mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-10 05:00:21 +02:00
lazutf8: prevent string codepage change
git-svn-id: trunk@35408 -
This commit is contained in:
parent
f290e72cdc
commit
76b34a64d8
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user