From: Marko Luukkainen Date: Mon, 14 Mar 2022 07:52:53 +0000 (+0200) Subject: SCLScenegraph breaks UTF8 strings X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=04220731a0cac3fe6fe2c3375a73d698e11d476f;p=simantics%2Fplatform.git SCLScenegraph breaks UTF8 strings gitlab #816 Change-Id: I88de9da87fb0ffb415082631176a55b39cc4d003 --- 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"))); }