Hi,
we have a problem with the encoding during the SVG generation.
See at this post how we create a svg:
http://www.nwoods.com/forum/forum_posts.asp?TID=3016&KW=
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?
ssmith
October 5, 2010, 2:12pm
2
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.setGenerateJGoXML(false); svgDomDoc.setGenerateSVG(true); 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.
ssmith
October 6, 2010, 1:31pm
4
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.