SVG Encoding


we have a problem with the encoding during the SVG generation.
See at this post how we create a svg:

I tried to use following code to set the encoding.

ByteArrayOutputStream oSVGBuffer = new ByteArrayOutputStream();
svgDomDoc.SVGWriteDoc(oSVGBuffer, oJGoDocument);
String sSVG = sSVG = oSVGBuffer.toString(“UTF-8”);

But this code has no influence on some special characters like ä,ö,ü.
I checked the ByteArrayOutputStream and i saw that every special character is translated to the byte-value -4

Is there another possiblitly to change the encoding inside the SVGWriteDoc method?

I created a JGoText object and set the text to ä,ö,ü.

I then output the result to a file using the following code:
ByteArrayOutputStream oSVGBuffer = new ByteArrayOutputStream();
DefaultDocument svgDomDoc = new DefaultDocument();
svgDomDoc.SVGWriteDoc(oSVGBuffer, this.goView.getDocument());
I then set a breakpoint to examine oSVGBuffer and saw the following:
So it appears SVGWriteDoc is preserving the special characters when I try it.

Thanks for the fast reply.

Ok, maybe it happens only on older JGo versions.
Can you please try the version 5.2 and Java 5.

I tried it again with JGo 5.2.0 and Java 5 and the results were the same.

Ok, I made also some checks.
Sorry, it was a failure in our logic.