Skip to content

Commit

Permalink
Changed encoding of localized strings to UTF-8
Browse files Browse the repository at this point in the history
  • Loading branch information
mizapf committed Dec 24, 2016
1 parent 12379c5 commit e2a7077
Show file tree
Hide file tree
Showing 3 changed files with 348 additions and 340 deletions.
14 changes: 11 additions & 3 deletions src/de/mizapf/timt/TIImageTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
import java.util.TreeSet;
import java.util.ResourceBundle;
import java.util.Locale;
import java.util.PropertyResourceBundle;
//

import javax.swing.*;
Expand Down Expand Up @@ -907,13 +908,20 @@ public static Locale getSysLocale() {
loadProperties();

// Load localized strings
m_resources = ResourceBundle.getBundle(LANGTEXT, getLocale(getPropertyString(LANG)));

// m_resources = ResourceBundle.getBundle(LANGTEXT, getLocale(getPropertyString(LANG)));
try {
String resourceFile = "Strings_" + getLocale(getPropertyString(LANG)).getLanguage() + ".properties";
m_resources = new PropertyResourceBundle(new InputStreamReader(ToolDialog.class.getResourceAsStream(resourceFile), "UTF-8"));
}
catch (IOException iox) {
iox.printStackTrace();
}

// Load the property texts
m_propNames = new Properties();
try {
String propFile = "names_" + getLocale(getPropertyString(LANG)).getLanguage() + ".prop";
m_propNames.load(ToolDialog.class.getResourceAsStream(propFile));
m_propNames.load(new InputStreamReader(ToolDialog.class.getResourceAsStream(propFile), "UTF-8"));
}
catch (IOException iox) {
iox.printStackTrace();
Expand Down
Loading

0 comments on commit e2a7077

Please sign in to comment.