From f7069851c79a492e8a7912b337c82d476db1301c Mon Sep 17 00:00:00 2001 From: SomeTroglodyte <63000004+SomeTroglodyte@users.noreply.github.com> Date: Tue, 5 Sep 2023 13:35:54 +0200 Subject: [PATCH] Fix Gdx not forced to UTF-8 when saving a game (#10062) --- core/src/com/unciv/logic/files/UncivFiles.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/com/unciv/logic/files/UncivFiles.kt b/core/src/com/unciv/logic/files/UncivFiles.kt index 4458f46751..e313fbde04 100644 --- a/core/src/com/unciv/logic/files/UncivFiles.kt +++ b/core/src/com/unciv/logic/files/UncivFiles.kt @@ -3,8 +3,8 @@ package com.unciv.logic.files import com.badlogic.gdx.Files import com.badlogic.gdx.Gdx import com.badlogic.gdx.files.FileHandle +import com.badlogic.gdx.utils.GdxRuntimeException import com.badlogic.gdx.utils.JsonReader -import com.badlogic.gdx.utils.GdxRuntimeException // Kdoc import com.badlogic.gdx.utils.SerializationException import com.unciv.UncivGame import com.unciv.json.fromJsonFile @@ -159,7 +159,7 @@ class UncivFiles( try { debug("Saving GameInfo %s to %s", game.gameId, file.path()) val string = gameInfoToString(game) - file.writeString(string, false) + file.writeString(string, false, Charsets.UTF_8.name()) saveCompletionCallback(null) } catch (ex: Exception) { saveCompletionCallback(ex)