mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-12 23:09:12 +02:00
Merged revisions 3606 via svnmerge from
http://svn.freepascal.org/svn/fpc/trunk r3606 (florian) * fix from Maxim Ganetsky to fix CRT output with non latin code pages, should fix #6785 git-svn-id: branches/fixes_2_0@3707 -
This commit is contained in:
parent
6f1f4a8d22
commit
34bf19f395
@ -666,7 +666,11 @@ Function CrtWrite(var f : textrec) : integer;
|
||||
var
|
||||
i : longint;
|
||||
s : string;
|
||||
OldConsoleOutputCP : Word;
|
||||
begin
|
||||
OldConsoleOutputCP:=GetConsoleOutputCP;
|
||||
SetConsoleOutputCP(GetACP);
|
||||
|
||||
GetScreenCursor(CurrX, CurrY);
|
||||
s:='';
|
||||
for i:=0 to f.bufpos-1 do
|
||||
@ -675,7 +679,7 @@ begin
|
||||
if s<>'' then
|
||||
begin
|
||||
WriteStr(s);
|
||||
s:='';
|
||||
s:='';
|
||||
end;
|
||||
WriteChar(f.buffer[i]);
|
||||
end
|
||||
@ -684,6 +688,8 @@ begin
|
||||
if s<>'' then
|
||||
WriteStr(s);
|
||||
SetScreenCursor(CurrX, CurrY);
|
||||
|
||||
SetConsoleOutputCP(OldConsoleOutputCP);
|
||||
|
||||
f.bufpos:=0;
|
||||
CrtWrite:=0;
|
||||
@ -704,7 +710,11 @@ Function CrtRead(Var F: TextRec): Integer;
|
||||
|
||||
var
|
||||
ch : Char;
|
||||
OldConsoleOutputCP : Word;
|
||||
Begin
|
||||
OldConsoleOutputCP:=GetConsoleOutputCP;
|
||||
SetConsoleOutputCP(GetACP);
|
||||
|
||||
GetScreenCursor(CurrX,CurrY);
|
||||
f.bufpos:=0;
|
||||
f.bufend:=0;
|
||||
@ -781,6 +791,9 @@ Begin
|
||||
end;
|
||||
end;
|
||||
until false;
|
||||
|
||||
SetConsoleOutputCP(OldConsoleOutputCP);
|
||||
|
||||
f.bufpos:=0;
|
||||
SetScreenCursor(CurrX, CurrY);
|
||||
CrtRead:=0;
|
||||
|
Loading…
Reference in New Issue
Block a user