Browse Source

Fixes presentation of translations in the GUI for non UTF-8 default PCs

Andreas T. Meyer-Berg 7 years ago
parent
commit
7bab6ae6e6
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/ui/view/Languages.java

+ 2 - 2
src/ui/view/Languages.java

@@ -1,8 +1,8 @@
 package ui.view;
 import java.io.BufferedReader;
-import java.io.File;
 import java.io.FileReader;
 import java.io.IOException;
+import java.nio.charset.Charset;
 
 public class Languages {
 
@@ -124,7 +124,7 @@ public class Languages {
 				//store line in Array, # initializes Comments
 				if (line.isEmpty() || line.startsWith("#"))
 					continue;
-				langArr[lineNumber]=line;
+				langArr[lineNumber]=new String(line.getBytes(Charset.defaultCharset()),"UTF-8");
 				lineNumber++;
 			}
 			//missing translations? -> english