Fix settings.json and markers.json not being written with the correct charset

This commit is contained in:
Lukas Rieger (Blue) 2023-07-03 13:03:52 +02:00
parent 1b2dc45b4b
commit 16c4b281ef
No known key found for this signature in database
GPG Key ID: 2D09EC5ED2687FF2
1 changed files with 2 additions and 2 deletions

View File

@ -195,7 +195,7 @@ public class BmMap {
private void saveMapSettings() {
try (
OutputStream out = storage.writeMeta(id, META_FILE_SETTINGS);
Writer writer = new OutputStreamWriter(out)
Writer writer = new OutputStreamWriter(out, StandardCharsets.UTF_8)
) {
ResourcesGson.addAdapter(new GsonBuilder())
.registerTypeAdapter(BmMap.class, new MapSettingsSerializer())
@ -209,7 +209,7 @@ public class BmMap {
public synchronized void saveMarkerState() {
try (
OutputStream out = storage.writeMeta(id, META_FILE_MARKERS);
Writer writer = new OutputStreamWriter(out)
Writer writer = new OutputStreamWriter(out, StandardCharsets.UTF_8)
) {
MarkerGson.INSTANCE.toJson(this.markerSets, writer);
} catch (Exception ex) {