Fix EDU-668 Broken encoding for Russian letters in New Project Wizard
authorValentina Kiryushkina <valentina.kiryushkina@jetbrains.com>
Tue, 2 Aug 2016 08:47:34 +0000 (11:47 +0300)
committerValentina Kiryushkina <valentina.kiryushkina@jetbrains.com>
Tue, 2 Aug 2016 08:51:04 +0000 (11:51 +0300)
python/educational-core/student/src/com/jetbrains/edu/learning/courseGeneration/StudyProjectGenerator.java

index 176df97c73736c28a35261e4107ca29293b28e08..0d2245936a940c9c3faaec831b0ca4ef82d3329b 100644 (file)
@@ -432,7 +432,7 @@ public class StudyProjectGenerator {
     try {
       final FileInputStream inputStream = new FileInputStream(cacheFile);
       try {
-        BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
+        BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, "UTF-8"));
         try {
           String line;
           while ((line = reader.readLine()) != null) {
@@ -448,6 +448,9 @@ public class StudyProjectGenerator {
           StudyUtils.closeSilently(reader);
         }
       }
+      catch (UnsupportedEncodingException e) {
+        LOG.error(e.getMessage());
+      }
       finally {
         StudyUtils.closeSilently(inputStream);
       }