mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-08 14:57:58 +07:00
Consistent UTF-8 where possible (#9927)
* Consistent UTF-8 where possible * Remove one import
This commit is contained in:
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user