`TerminalView`: fix unicode output on UNIX platforms jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Fri, 14 Jun 2019 12:45:30 +0100
branchjv
changeset 6068 5e8b7ee23889
parent 6067 f0e51145a4ec
child 6069 bc60050be743
`TerminalView`: fix unicode output on UNIX platforms Rather than depending solely on user setting, consult locale on UNIX systems and use UTF-8 if using UTF-8 locale.
TerminalView.st
--- a/TerminalView.st	Mon May 20 13:58:11 2019 +0100
+++ b/TerminalView.st	Fri Jun 14 12:45:30 2019 +0100
@@ -1741,7 +1741,8 @@
     outputIsUTF8 := false. "/ currently unused.
     autoWrapFlag := true.
     noColors := false.
-    doUTF := UserPreferences current terminalOutputIsUTF8.
+    doUTF := (UserPreferences current terminalOutputIsUTF8)
+                or:[ (OperatingSystem isUNIXlike and:[OperatingSystem getCodeset == #utf8]) ].
     lineEditMode := OperatingSystem isMSWINDOWSlike.
     maxHistorySize := maxHistorySize ? DefaultMaxHistorySize.
     ignoreOutput := false.
@@ -1774,6 +1775,7 @@
     "
 
     "Modified: / 30-07-2013 / 10:43:07 / cg"
+    "Modified: / 14-06-2019 / 12:25:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 initializeKeyboardMap