mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-19 05:09:07 +02:00
* Codepage code had a bug
git-svn-id: trunk@3434 -
This commit is contained in:
parent
9f249e2bb0
commit
111fc2ca42
@ -898,16 +898,15 @@ procedure decide_codepages;
|
|||||||
var s:string;
|
var s:string;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
{$ifdef linux}
|
if external_codepage in vga_codepages then
|
||||||
if console=ttyLinux then
|
|
||||||
begin
|
begin
|
||||||
|
{Possible override...}
|
||||||
s:=upcase(fpgetenv('CONSOLEFONT_CP'));
|
s:=upcase(fpgetenv('CONSOLEFONT_CP'));
|
||||||
if s='CP437' then
|
if s='CP437' then
|
||||||
external_codepage:=cp437
|
external_codepage:=cp437
|
||||||
else if s='CP850' then
|
else if s='CP850' then
|
||||||
external_codepage:=cp850;
|
external_codepage:=cp850;
|
||||||
end;
|
end;
|
||||||
{$endif}
|
|
||||||
{A non-vcsa Linux console can display most control characters, but not all.}
|
{A non-vcsa Linux console can display most control characters, but not all.}
|
||||||
if {$ifdef linux}(console<>ttyLinux) and{$endif}
|
if {$ifdef linux}(console<>ttyLinux) and{$endif}
|
||||||
(cur_term_strings=@term_codes_linux) then
|
(cur_term_strings=@term_codes_linux) then
|
||||||
@ -998,7 +997,10 @@ begin
|
|||||||
{ open console, $1b6=rw-rw-rw- }
|
{ open console, $1b6=rw-rw-rw- }
|
||||||
ttyfd:=fpopen(fname,$1b6,O_RDWR);
|
ttyfd:=fpopen(fname,$1b6,O_RDWR);
|
||||||
if ttyfd<>-1 then
|
if ttyfd<>-1 then
|
||||||
console:=ttylinux
|
begin
|
||||||
|
console:=ttylinux;
|
||||||
|
external_codepage:=cp437; {VCSA defaults to codepage 437.}
|
||||||
|
end
|
||||||
else
|
else
|
||||||
if try_grab_vcsa then
|
if try_grab_vcsa then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user