v0.7.5e: added desktop support for asian languages
This commit is contained in:
@@ -21,6 +21,8 @@
|
||||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.messages;
|
||||
|
||||
import com.badlogic.gdx.Application;
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
||||
|
||||
@@ -88,7 +90,17 @@ public class Messages {
|
||||
while (keys.hasMoreElements()) {
|
||||
String key = keys.nextElement();
|
||||
String value = bundle.getString(key);
|
||||
|
||||
|
||||
//TODO do all desktop platforms read as ISO, or only windows?
|
||||
// should also move this to platform support, probably.
|
||||
if (Gdx.app.getType() == Application.ApplicationType.Desktop) {
|
||||
try {
|
||||
value = new String(value.getBytes("ISO-8859-1"), "UTF-8");
|
||||
} catch (Exception e) {
|
||||
ShatteredPixelDungeon.reportException(e);
|
||||
}
|
||||
}
|
||||
|
||||
strings.put(key, value);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user