You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Vladimir Bulatov <bu...@physics.orst.edu> on 2004/12/15 21:29:04 UTC
saving SVG files with special symbols?
Hi everybody,
I have the following problem.
I have troubles with SVG files, which have a lot of non ascii symbols.
These symbolsa are encoded in the standard XML way as hex string, for example
<glyph unicode="">... <text></text>
When I open that file in Batik, it displays just fine.
However, when I write the document into a new file using
the TranscoderOutput:
FileOutputStream fout = new FileOutputStream(tempName);
Writer ostream = new OutputStreamWriter(fout);
TranscoderOutput output = new TranscoderOutput(ostream);
t.transcode(input, output);
I've got question marks instead of hex string:
<glyph unicode="?">...<text>?</text>
If I modify output stream to use "UTF-8" encoding:
FileOutputStream fout = new FileOutputStream(tempName);
Writer ostream = new OutputStreamWriter(fout, "UTF-8");
TranscoderOutput output = new TranscoderOutput(ostream);
t.transcode(input, output);
I have some fancy characters instead:
<glyph unicode="some non-ascii characters">...<text>non-anscii symbols</text>
How should I save that document into a file? I need to keep the original hex
represenation.
All the best,
Vladimir Bulatov
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org