xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Archie Cobbs <arc...@dellroad.org>
Subject Re: How do I display unicode (non-ascii) characters using SVGGraphics2D?
Date Wed, 14 Jul 2004 19:32:13 GMT
Jody Schofield wrote:
> I'm trying to create an SVG file using the SVGGraphics2D so that I get the 
> following:
> 
> <text ...>&#xAB;Label&#xBB;</text>
> 
> i.e. <<Label>>
> 
> The << and >> are single characters.  When I call drawString( 
> "&#AB;Label&#BB", x, y );  I get <text ...>&amp;#xAB...

The ampersand "escape" is an XML thing, not a Java thing.
In Java you can use \u for non-ASCII characters.

So try something like this.. 

  drawString("\u00ABLabel\u00BB");

Not sure if << and >> are Unicode characters though. You may need
to use different corresponding Unicode values.

-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com

---------------------------------------------------------------------
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