Jump to content
We've recently updated our Privacy Statement, available here ×

IReport xml and currency symbol


stuartbloom

Recommended Posts

 Hi

Sorry if this is a silly question.

I am writing a simple report that uses an XML data source.  The contents of which is similar to 

<data>

<row idVoucher="1234"  issuedDate="02/02/2011"  issuedTo="Stuart Bloom"  expiryDate="02/02/2012"  amount="€22.00"  comapnyName="Company Name"  comapnyAdd1="Add1"  comapnyAdd2="Add2"  comapnyAdd3="Add3"  comapnyPhone="Phone"  comapnyFax="Fax"  />

</data>

The problem I am having is that is fails to parse the XML, however, if i remove the € symbol all is fine.  I need the € symbol as the output may be created in a different local to that of the users browser.
 
I would be extremely grateful for any assistance to be able to pass a € or £ to the report in the XML file.
 
Stuart
Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Notrolls 

Thanks for your reply, you are correct Google is good, however, it helps to know what you are actually looking for ;)

I have been searching all morning without success, however, I now have a file that looks like below, and although the parser doesn't fall over the Euro symbol is just not printed on the report.

Would you have any ideas?

Many thanks

Stuart

File Contents--------------------------------------------------------------------------

<?xml version="1.0" encoding="ISO-8859-15"?>

<data>

  <row

    idVoucher="1234"

    issuedDate="02/02/2011"

    issuedTo="Stuart Bloom"

    expiryDate="02/02/2012"

    amount="€22.00"

    comapnyName="Company Name"

    comapnyAdd1="Add1"

    comapnyAdd2="Add2"

    comapnyAdd3="Add3"

    comapnyPhone="Phone"

    comapnyFax="Fax"  

  />

</data>

 
Link to comment
Share on other sites

Here's something to try:

 

I see that your XML Document is using 8859-15 encoding.

 

According to the current Wikipedia page, the 8859-15 encoded value of the Euro sign is  0x4A

 http://en.wikipedia.org/wiki/ISO/IEC_8859-15

 

So you could try escaping the Euro sign in your report XML  by using:

 

¤  in place of the euro sign.

 

as in 

amount="¤ 22.00"

 

I'm not sure about the environment that the XML document is processed in (yet), but this might work and could be worth a try.

 

=thorick

 

 



Post Edited by thorick at 02/03/2011 17:18
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...