Tutorials will now always be read with the correct encoding

This commit is contained in:
Yair Morgenstern 2019-12-02 22:02:21 +02:00
parent 7a9fd14b13
commit f79858e39e

View file

@ -26,7 +26,7 @@ object GameBasics {
val Translations = Translations()
fun <T> getFromJson(tClass: Class<T>, name: String): T {
val jsonText = Gdx.files.internal("jsons/$name.json").readString()
val jsonText = Gdx.files.internal("jsons/$name.json").readString(Charsets.UTF_8.name())
return Json().apply { ignoreUnknownFields = true }.fromJson(tClass, jsonText)
}