xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vladimir Bulatov <bula...@physics.orst.edu>
Subject saving SVG files with special symbols?
Date Wed, 15 Dec 2004 20:29:04 GMT
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="&#xF0AB;">... <text>&#xF0AB;</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


Mime
View raw message