xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher R. Maden" <cr...@maden.org>
Subject Re: How to translate characters?
Date Tue, 06 Sep 2011 01:31:48 GMT
On 09/05/2011 06:31 PM, Eric Douglas wrote:
> So, I'm confused.  I put that exact string into an fo:inline.
> I'm running embedded code and I separated the XML-FO transform step from the FOP step.
> I'm just running a straight Oracle transform.
> My input is an XML file containing the string &#x25A1;
> My transformer is created using an XSL file.
> My output is an FO file with that string converted to a square.
> I put that string into a Java String and get the value.  It comes out the same as it
went in.
> How do I get the value of the String as a square?

Java is not XML.  Java has no native facility for interpreting an XML
numeric character reference, so you are getting exactly the expected

I don’t speak Java well, but try something like this:

String square = new String( [ 0x25a1 ], 0, 1 );

Then pass that string, square, to FOP.

If that doesn’t help, I’m done; I can read Java, but don’t really write
it well.

Chris Maden, text nerd  <URL: http://crism.maden.org/ >
“The present tendency and drift towards the Police State gives all
 free Americans pause.” — Alabama Supreme Court, 1955
 (Pike v. Southern Bell Tel. & Telegraph, 81 So.2d 254)

View raw message