[codeface] [PATCH] Set R environment locale to english

  • From: Mitchell Joblin <joblin.m@xxxxxxxxx>
  • To: codeface@xxxxxxxxxxxxx
  • Date: Thu, 3 Apr 2014 18:16:13 +0200

- if the locale is not english the parser will silently incorrectly
  parse emails

Signed-off-by: Mitchell Joblin <mitchell.joblin.ext@xxxxxxxxxxx>
---
 codeface/R/ml/batch.r | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/codeface/R/ml/batch.r b/codeface/R/ml/batch.r
index cb2dde4..87d8453 100755
--- a/codeface/R/ml/batch.r
+++ b/codeface/R/ml/batch.r
@@ -80,6 +80,9 @@ config.script.run({
       lw("Are you sure this setup is correct? Continuing nevertheless.")
     }
 
+    ## Email parser relies on locale and should be set to english
+    Sys.setlocale(category="LC_ALL", locale ="en_US.UTF-8")
+
     conf <- init.mc(conf)
     dispatch.all(conf, conf$mldir, conf$resdir)
 })
-- 
1.8.3.2


Other related posts: