From 95ba16228a8018187bf4e1a1d6324ede023efede Mon Sep 17 00:00:00 2001 From: Nikolay Nikolov Date: Sun, 1 May 2022 10:34:47 +0300 Subject: [PATCH] + use some ASCII replacements for certain non-ASCII characters (used by Free Vision) on Unix consoles that don't support UTF-8 --- packages/rtl-console/src/unix/video.pp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/packages/rtl-console/src/unix/video.pp b/packages/rtl-console/src/unix/video.pp index 6719b77898..315729a85d 100644 --- a/packages/rtl-console/src/unix/video.pp +++ b/packages/rtl-console/src/unix/video.pp @@ -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;