From 771fc961c44d5085a809024defc81d75f7ff60de Mon Sep 17 00:00:00 2001 From: Qing Date: Sun, 15 Jul 2018 20:53:29 -0700 Subject: [PATCH] add encoding format --- .../src/main/scala/org/apache/mxnetexamples/rnn/BucketIo.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scala-package/examples/src/main/scala/org/apache/mxnetexamples/rnn/BucketIo.scala b/scala-package/examples/src/main/scala/org/apache/mxnetexamples/rnn/BucketIo.scala index 27e4c932c0e9..75829fa56dbb 100644 --- a/scala-package/examples/src/main/scala/org/apache/mxnetexamples/rnn/BucketIo.scala +++ b/scala-package/examples/src/main/scala/org/apache/mxnetexamples/rnn/BucketIo.scala @@ -32,7 +32,7 @@ object BucketIo { type ReadContent = String => String def defaultReadContent(path: String): String = { - Source.fromFile(path).mkString.replaceAll("\\. |\n", " ") + Source.fromFile(path, "UTF-8").mkString.replaceAll("\\. |\n", " ") } def defaultBuildVocab(path: String): Map[String, Int] = {