Skip to content

Commit e2a7077

Browse files
committed
Changed encoding of localized strings to UTF-8
1 parent 12379c5 commit e2a7077

File tree

3 files changed

+348
-340
lines changed

3 files changed

+348
-340
lines changed

src/de/mizapf/timt/TIImageTool.java

+11-3
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
import java.util.TreeSet;
106106
import java.util.ResourceBundle;
107107
import java.util.Locale;
108+
import java.util.PropertyResourceBundle;
108109
//
109110

110111
import javax.swing.*;
@@ -907,13 +908,20 @@ public static Locale getSysLocale() {
907908
loadProperties();
908909

909910
// Load localized strings
910-
m_resources = ResourceBundle.getBundle(LANGTEXT, getLocale(getPropertyString(LANG)));
911-
911+
// m_resources = ResourceBundle.getBundle(LANGTEXT, getLocale(getPropertyString(LANG)));
912+
try {
913+
String resourceFile = "Strings_" + getLocale(getPropertyString(LANG)).getLanguage() + ".properties";
914+
m_resources = new PropertyResourceBundle(new InputStreamReader(ToolDialog.class.getResourceAsStream(resourceFile), "UTF-8"));
915+
}
916+
catch (IOException iox) {
917+
iox.printStackTrace();
918+
}
919+
912920
// Load the property texts
913921
m_propNames = new Properties();
914922
try {
915923
String propFile = "names_" + getLocale(getPropertyString(LANG)).getLanguage() + ".prop";
916-
m_propNames.load(ToolDialog.class.getResourceAsStream(propFile));
924+
m_propNames.load(new InputStreamReader(ToolDialog.class.getResourceAsStream(propFile), "UTF-8"));
917925
}
918926
catch (IOException iox) {
919927
iox.printStackTrace();

0 commit comments

Comments
 (0)