mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-19 11:09:22 +02:00
+ use some ASCII replacements for certain non-ASCII characters (used by Free
Vision) on Unix consoles that don't support UTF-8
This commit is contained in:
parent
f67c4b1c45
commit
95ba16228a
@ -568,6 +568,29 @@ var
|
||||
begin
|
||||
result:=Utf8Encode(hstr);
|
||||
SetCodePage(result,external_codepage,True);
|
||||
if (result='?') and (hstr<>'?') then
|
||||
begin
|
||||
{ Character is missing in the external codepage. }
|
||||
{ Try some replacements. }
|
||||
if Length(hstr)=1 then
|
||||
begin
|
||||
case hstr[1] of
|
||||
#$2195:
|
||||
result:='|';
|
||||
#$2191,#$25B2:
|
||||
result:='^';
|
||||
#$2193,#$25BC:
|
||||
result:='v';
|
||||
#$2192,#$25BA:
|
||||
result:='>';
|
||||
#$2190,#$25C4:
|
||||
result:='<';
|
||||
#$25A0:
|
||||
result:='*';
|
||||
end;
|
||||
SetCodePage(result,external_codepage,False);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user