mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-05 21:11:35 +07:00
Fix Gdx not forced to UTF-8 when saving a game (#10062)
This commit is contained in:
parent
93f882d3c8
commit
f7069851c7
@ -3,8 +3,8 @@ package com.unciv.logic.files
|
|||||||
import com.badlogic.gdx.Files
|
import com.badlogic.gdx.Files
|
||||||
import com.badlogic.gdx.Gdx
|
import com.badlogic.gdx.Gdx
|
||||||
import com.badlogic.gdx.files.FileHandle
|
import com.badlogic.gdx.files.FileHandle
|
||||||
|
import com.badlogic.gdx.utils.GdxRuntimeException
|
||||||
import com.badlogic.gdx.utils.JsonReader
|
import com.badlogic.gdx.utils.JsonReader
|
||||||
import com.badlogic.gdx.utils.GdxRuntimeException // Kdoc
|
|
||||||
import com.badlogic.gdx.utils.SerializationException
|
import com.badlogic.gdx.utils.SerializationException
|
||||||
import com.unciv.UncivGame
|
import com.unciv.UncivGame
|
||||||
import com.unciv.json.fromJsonFile
|
import com.unciv.json.fromJsonFile
|
||||||
@ -159,7 +159,7 @@ class UncivFiles(
|
|||||||
try {
|
try {
|
||||||
debug("Saving GameInfo %s to %s", game.gameId, file.path())
|
debug("Saving GameInfo %s to %s", game.gameId, file.path())
|
||||||
val string = gameInfoToString(game)
|
val string = gameInfoToString(game)
|
||||||
file.writeString(string, false)
|
file.writeString(string, false, Charsets.UTF_8.name())
|
||||||
saveCompletionCallback(null)
|
saveCompletionCallback(null)
|
||||||
} catch (ex: Exception) {
|
} catch (ex: Exception) {
|
||||||
saveCompletionCallback(ex)
|
saveCompletionCallback(ex)
|
||||||
|
Loading…
Reference in New Issue
Block a user