changeset 5279:93c09655d6a8

Ensemble8: Explicitly specify UTF-8 encoding for streams in code generation phase.
author Alexander Kouznetsov
date Mon, 07 Oct 2013 11:12:23 +0400
parents a554b76b5ee6
children b275a99ef7f5
files apps/samples/Ensemble8/src/compiletime/java/ensemble/compiletime/BuildSamplesList.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/apps/samples/Ensemble8/src/compiletime/java/ensemble/compiletime/BuildSamplesList.java	Mon Oct 07 10:49:58 2013 +0400
+++ b/apps/samples/Ensemble8/src/compiletime/java/ensemble/compiletime/BuildSamplesList.java	Mon Oct 07 11:12:23 2013 +0400
@@ -76,7 +76,7 @@
         // write
         PrintWriter fout = null;
         try {
-            fout = new PrintWriter(new FileWriter(samplesSourceFile));
+            fout = new PrintWriter(samplesSourceFile, "UTF-8");
             fout.println("package ensemble.generated;");
             fout.println("import ensemble.*;");
             fout.println("import ensemble.playground.PlaygroundProperty;");
@@ -298,7 +298,7 @@
         try {
             // load src into String
             in = new FileInputStream(file);
-            BufferedReader reader = new BufferedReader(new InputStreamReader(in));
+            BufferedReader reader = new BufferedReader(new InputStreamReader(in, "UTF-8"));
             String line;
             while((line = reader.readLine()) != null) {
                 builder.append(line);