src/Pure/ML/ml_process.scala
changeset 69702 1adc89c4a795
parent 69573 c7a69b6cd405
child 69831 b35c3839d5d1
--- a/src/Pure/ML/ml_process.scala	Mon Jan 21 15:10:26 2019 +0100
+++ b/src/Pure/ML/ml_process.scala	Mon Jan 21 16:50:48 2019 +0100
@@ -129,8 +129,13 @@
     val ml_runtime_options =
     {
       val ml_options = Word.explode(Isabelle_System.getenv("ML_OPTIONS"))
-      if (ml_options.exists(_.containsSlice("gcthreads"))) ml_options
-      else ml_options ::: List("--gcthreads", options.int("threads").toString)
+      val ml_options1 =
+        if (ml_options.exists(_.containsSlice("gcthreads"))) ml_options
+        else ml_options ::: List("--gcthreads", options.int("threads").toString)
+      val ml_options2 =
+        if (!Platform.is_windows || ml_options.exists(_.containsSlice("codepage"))) ml_options1
+        else ml_options1 ::: List("--codepage", "utf8")
+      ml_options2
     }
 
     // bash