Fix EDU-669 Broken encoding for Russian letters in Task Description Panel appcode/163.2146 clion/163.2147
authorValentina Kiryushkina <valentina.kiryushkina@jetbrains.com>
Tue, 2 Aug 2016 08:47:15 +0000 (11:47 +0300)
committerValentina Kiryushkina <valentina.kiryushkina@jetbrains.com>
Tue, 2 Aug 2016 08:51:33 +0000 (11:51 +0300)
python/educational-core/student/src/com/jetbrains/edu/learning/StudyUtils.java

index decb5f3210e8e80d81e5d5802892f42781b7f4b9..310e99f046fc6ce2a38affb9f5ed99e7a4131595 100644 (file)
@@ -21,6 +21,7 @@ import com.intellij.openapi.fileEditor.FileDocumentManager;
 import com.intellij.openapi.fileEditor.FileEditor;
 import com.intellij.openapi.fileEditor.FileEditorManager;
 import com.intellij.openapi.fileEditor.ex.FileEditorManagerEx;
+import com.intellij.openapi.fileEditor.impl.LoadTextUtil;
 import com.intellij.openapi.progress.ProgressManager;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.project.ProjectManager;
@@ -502,12 +503,7 @@ public class StudyUtils {
       }
     }
     if (taskTextFile != null) {
-      try {
-        return FileUtil.loadTextAndClose(taskTextFile.getInputStream());
-      }
-      catch (IOException e) {
-        LOG.info(e);
-      }
+      return String.valueOf(LoadTextUtil.loadText(taskTextFile));
     }
     return null;
   }