v0.3.4: fixed messages issues on android 2.2
This commit is contained in:
parent
bcc0dc1ffe
commit
a0ad0de914
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user