From 04220731a0cac3fe6fe2c3375a73d698e11d476f Mon Sep 17 00:00:00 2001 From: Marko Luukkainen Date: Mon, 14 Mar 2022 09:52:53 +0200 Subject: [PATCH] SCLScenegraph breaks UTF8 strings gitlab #816 Change-Id: I88de9da87fb0ffb415082631176a55b39cc4d003 --- .../src/org/simantics/modeling/SCLScenegraph.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bundles/org.simantics.modeling/src/org/simantics/modeling/SCLScenegraph.java b/bundles/org.simantics.modeling/src/org/simantics/modeling/SCLScenegraph.java index cc4489f82..1b0c4221a 100644 --- a/bundles/org.simantics.modeling/src/org/simantics/modeling/SCLScenegraph.java +++ b/bundles/org.simantics.modeling/src/org/simantics/modeling/SCLScenegraph.java @@ -9,6 +9,7 @@ import java.awt.geom.AffineTransform; import java.awt.geom.Rectangle2D; import java.io.ByteArrayOutputStream; import java.io.OutputStreamWriter; +import java.nio.charset.Charset; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -525,7 +526,7 @@ public class SCLScenegraph { LOGGER.error("Problems formatting SVGDocument to text.", t); } - result.append(new String(os.toByteArray())); + result.append(new String(os.toByteArray(), Charset.forName("UTF-8"))); } -- 2.47.1