Consistent UTF-8 where possible (#9927)

* Consistent UTF-8 where possible

* Remove one import
This commit is contained in:
SomeTroglodyte
2023-08-21 17:17:21 +02:00
committed by GitHub
parent 4851865bce
commit cc43a41ec7
13 changed files with 31 additions and 31 deletions

View File

@ -65,7 +65,7 @@ internal object DesktopLauncher {
width = maximumWindowBounds.width,
height = maximumWindowBounds.height
)
FileHandle(SETTINGS_FILE_NAME).writeString(json().toJson(settings), false) // so when we later open the game we get fullscreen
FileHandle(SETTINGS_FILE_NAME).writeString(json().toJson(settings), false, Charsets.UTF_8.name()) // so when we later open the game we get fullscreen
}
// Kludge! This is a workaround - the matching call in DesktopDisplay doesn't "take" quite permanently,
// the window might revert to the "config" values when the user moves the window - worse if they

View File

@ -121,7 +121,7 @@ internal object ImagePacker {
// An image folder can optionally have a TexturePacker settings file
val settingsFile = File("$input${File.separator}TexturePacker.settings")
val settings = if (settingsFile.exists())
Json().fromJson(TexturePacker.Settings::class.java, settingsFile.reader())
Json().fromJson(TexturePacker.Settings::class.java, settingsFile.reader(Charsets.UTF_8))
else defaultSettings
TexturePacker.process(settings, input, output, packFileName)

View File

@ -39,6 +39,9 @@ object SystemUtils {
builder.appendLine("Max Memory: $maxMemory MB")
}
// Encoding used by Java when not explicitly specified/-able (such as atlas loader)
builder.appendLine("System default encoding: " + Charset.defaultCharset().name())
return builder.toString()
}