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 Jody Schofield <js...@ca.ibm.com> on 2004/07/14 21:21:25 UTC
How do I display unicode (non-ascii) characters using SVGGraphics2D?
Hello,
I'm trying to create an SVG file using the SVGGraphics2D so that I get the
following:
<text ...>«Label»</text>
i.e. <<Label>>
The << and >> are single characters. When I call drawString(
"&#AB;Label&#BB", x, y ); I get <text ...>&#xAB...
Thanks for any and all help.
Jody
_____
Jody Schofield
Software Developer, Aurora Shapes Team
Rational Software / IBM Software Group
tel: 613.591.7047 jschofie@ca.ibm.com
Re: How do I display unicode (non-ascii) characters using SVGGraphics2D?
Posted by Thomas DeWeese <Th...@Kodak.com>.
Jody Schofield wrote:
>
> Hey Archie,
> I tried your suggestion but that didn't seem to help either. It just
> displays "\u00AB...".
What just displays "\u00AB"?
If this is done from java nothing downstream should see it.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org
Re: How do I display unicode (non-ascii) characters using SVGGraphics2D?
Posted by Jody Schofield <js...@ca.ibm.com>.
Hey Archie,
I tried your suggestion but that didn't seem to help either. It just
displays "\u00AB...".
thanks,
Jody
Archie Cobbs <ar...@dellroad.org>
07/14/2004 03:32 PM
Please respond to
"Batik Users" <ba...@xml.apache.org>
To
Batik Users <ba...@xml.apache.org>
cc
Subject
Re: How do I display unicode (non-ascii) characters using SVGGraphics2D?
Jody Schofield wrote:
> I'm trying to create an SVG file using the SVGGraphics2D so that I get
the
> following:
>
> <text ...>«Label»</text>
>
> i.e. <<Label>>
>
> The << and >> are single characters. When I call drawString(
> "&#AB;Label&#BB", x, y ); I get <text ...>&#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
Re: How do I display unicode (non-ascii) characters using SVGGraphics2D?
Posted by Archie Cobbs <ar...@dellroad.org>.
Jody Schofield wrote:
> I'm trying to create an SVG file using the SVGGraphics2D so that I get the
> following:
>
> <text ...>«Label»</text>
>
> i.e. <<Label>>
>
> The << and >> are single characters. When I call drawString(
> "&#AB;Label&#BB", x, y ); I get <text ...>&#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