]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
SCLScenegraph breaks UTF8 strings 05/4905/1
authorMarko Luukkainen <marko.luukkainen@semantum.fi>
Mon, 14 Mar 2022 07:52:53 +0000 (09:52 +0200)
committerMarko Luukkainen <marko.luukkainen@semantum.fi>
Mon, 14 Mar 2022 07:52:53 +0000 (09:52 +0200)
gitlab #816

Change-Id: I88de9da87fb0ffb415082631176a55b39cc4d003

bundles/org.simantics.modeling/src/org/simantics/modeling/SCLScenegraph.java

index cc4489f8230812b15badd4287bae73582c47421d..1b0c4221a038f763bc2b814cc04436fd5fdef7f9 100644 (file)
@@ -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")));
 
                }