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
68218cbb
Commit
68218cbb
authored
Apr 22, 2022
by
PasserbyAlpha
Browse files
fixed encoding problem when generating gm handbook
parent
1dfe8733
Changes
1
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/tools/Tools.java
View file @
68218cbb
package
emu.grasscutter.tools
;
package
emu.grasscutter.tools
;
import
java.io.FileInputStream
;
import
java.io.FileReader
;
import
java.io.FileReader
;
import
java.io.FileWriter
;
import
java.io.FileWriter
;
import
java.io.InputStreamReader
;
import
java.io.PrintWriter
;
import
java.io.PrintWriter
;
import
java.nio.charset.StandardCharsets
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.time.format.DateTimeFormatter
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -30,7 +33,7 @@ public final class Tools {
...
@@ -30,7 +33,7 @@ public final class Tools {
ResourceLoader
.
loadResources
();
ResourceLoader
.
loadResources
();
Map
<
Long
,
String
>
map
;
Map
<
Long
,
String
>
map
;
try
(
File
Reader
fileReader
=
new
FileReader
(
Utils
.
toFilePath
(
Grasscutter
.
getConfig
().
RESOURCE_FOLDER
+
"TextMap/TextMapEN.json"
)))
{
try
(
InputStream
Reader
fileReader
=
new
InputStreamReader
(
new
FileInputStream
(
Utils
.
toFilePath
(
Grasscutter
.
getConfig
().
RESOURCE_FOLDER
+
"TextMap/TextMapEN.json"
))
,
StandardCharsets
.
UTF_8
)
)
{
map
=
Grasscutter
.
getGsonFactory
().
fromJson
(
fileReader
,
new
TypeToken
<
Map
<
Long
,
String
>>()
{}.
getType
());
map
=
Grasscutter
.
getGsonFactory
().
fromJson
(
fileReader
,
new
TypeToken
<
Map
<
Long
,
String
>>()
{}.
getType
());
}
}
...
...
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