Browse Source

* check the LC_CTYPE env var instead of LANG on OpenBSD to check whether UTF-8
is enabled

git-svn-id: branches/unicodekvm@42321 -

nickysn 6 years ago
parent
commit
6aa8b718f4
1 changed files with 4 additions and 0 deletions
  1. 4 0
      packages/rtl-console/src/unix/unixkvmbase.pp

+ 4 - 0
packages/rtl-console/src/unix/unixkvmbase.pp

@@ -39,7 +39,11 @@ function UTF8Enabled: Boolean;
 var
   lang:string;
 begin
+{$ifdef OpenBSD}
+  lang:=upcase(fpgetenv('LC_CTYPE'));
+{$else OpenBSD}
   lang:=upcase(fpgetenv('LANG'));
+{$endif OpenBSD}
   UTF8Enabled := (Pos('.UTF-8', lang) > 0) or (Pos('.UTF8', lang) > 0);
 end;
 {$endif}