mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 22:19:17 +02:00
LazUtf8: Fix Utf8ToConsole. Patch by ChrisF, modified by me. Issue #0028371.
git-svn-id: trunk@50514 -
This commit is contained in:
parent
bd6984dbfd
commit
efc3ca18be
@ -245,13 +245,20 @@ var
|
||||
begin
|
||||
{$ifdef WinCE}
|
||||
Result := UTF8ToSys(s);
|
||||
{$else}
|
||||
Result := UTF8ToSys(s);
|
||||
{$else WinCE}
|
||||
{$ifndef NO_CP_RTL}
|
||||
Result := UTF8ToWinCP(s);
|
||||
{$else NO_CP_RTL}
|
||||
Result := UTF8ToSys(s); // Kept for compatibility
|
||||
{$endif NO_CP_RTL}
|
||||
Dst := AllocMem((Length(Result) + 1) * SizeOf(Char));
|
||||
if CharToOEM(PChar(Result), Dst) then
|
||||
Result := StrPas(Dst);
|
||||
FreeMem(Dst);
|
||||
{$endif}
|
||||
{$ifndef NO_CP_RTL}
|
||||
SetCodePage(RawByteString(Result), CP_OEMCP, False);
|
||||
{$endif NO_CP_RTL}
|
||||
{$endif WinCE}
|
||||
end;
|
||||
|
||||
{$IFDEF MSWindows}
|
||||
|
Loading…
Reference in New Issue
Block a user