v0.3.4: fixed messages issues on android 2.2

This commit is contained in:
Evan Debenham 2016-01-22 14:54:22 -05:00 committed by Evan Debenham
parent bcc0dc1ffe
commit a0ad0de914

View File

@ -67,7 +67,16 @@ public class Messages {
Enumeration<String> keys = bundle.getKeys();
while (keys.hasMoreElements()) {
String key = keys.nextElement();
strings.put(key, bundle.getString(key));
String value = bundle.getString(key);
//android 2.2 doesn't use UTF-8 by default, need to force it.
if (android.os.Build.VERSION.SDK_INT == 8) {
try {
value = new String(value.getBytes("ISO-8859-1"), "UTF-8");
} catch (Exception e) {}
}
strings.put(key, value);
}
}
}