Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
f3baa0b8
Commit
f3baa0b8
authored
Jul 29, 2022
by
Someone999
Browse files
Changed charset of FileReader in ConfigContainer from default to utf-8.
parent
66dadece
Changes
1
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/config/ConfigContainer.java
View file @
f3baa0b8
...
...
@@ -5,6 +5,7 @@ import emu.grasscutter.Grasscutter;
import
emu.grasscutter.Grasscutter.ServerDebugMode
;
import
emu.grasscutter.Grasscutter.ServerRunMode
;
import
java.nio.charset.StandardCharsets
;
import
java.util.Set
;
import
java.io.FileReader
;
import
java.lang.reflect.Field
;
...
...
@@ -27,7 +28,7 @@ public class ConfigContainer {
public
static
void
updateConfig
()
{
try
{
// Check if the server is using a legacy config.
JsonObject
configObject
=
Grasscutter
.
getGsonFactory
()
.
fromJson
(
new
FileReader
(
Grasscutter
.
configFile
),
JsonObject
.
class
);
.
fromJson
(
new
FileReader
(
Grasscutter
.
configFile
,
StandardCharsets
.
UTF_8
),
JsonObject
.
class
);
if
(!
configObject
.
has
(
"version"
))
{
Grasscutter
.
getLogger
().
info
(
"Updating legacy .."
);
Grasscutter
.
saveConfig
(
null
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment