[#3247] - Invalid byte 1 of 1-byte UTF-8

Category:
Bug report
Priority:
Immediate
Status:
Closed
Project: Severity:
Block
Resolution:
Fixed
Component: Reproducibility:
Always
Assigned to:

nb is inserting invalid characters into the xml causing the report not to compile. See attached screenshots.

[jrc] File : C:\DEV\workspace\ReportProof\reports\designs\CostSum_ManyMemCats_AllColumns.uk.jrxml ... FAILED.
[jrc] Error compiling report design : C:\DEV\workspace\ReportProof\reports\designs\CostSum_ManyMemCats_AllColumns.uk.jrxml
[jrc] net.sf.jasperreports.engine.JRException: org.xml.sax.SAXParseException: Invalid byte 1 of 1-byte UTF-8 sequence.
[jrc] at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:243)

AttachmentSize
Image icon formatting.gif6.64 KB
snowch's picture
212
Joined: Oct 13 2008 - 4:43am
Last seen: 14 years 7 months ago

3 Comments:

#1

Same problem with nb version 3.1.2 when I reload a previously saved report containing accented characters.
As a work around, I simply open the jrxml file in notepad++, convert it to UTF-8, and save it as-is.
So it seems jrxml files are saved as pure ANSI, though the encoding is explicitely set to UTF-8 in the XML header.

#2

1. Convert your jrxml in UTF-8 with an editor (like UltraEdit)

2. Change the file &ltireport-install-dir>/etc/ireport.conf in this way:

default_options="-J-Xms24m -J-Xmx512m -J-Dfile.encoding=UTF-8"

In this way UTF-8 will be the default encoding to save files, otherwise iReport will use the system default that is not good on some systems.

I'll make this a default setting in 3.1.4

#3
  • Assigned:nobody»
AttachmentSize
Binary Data socios.jrxml1.17 KB
Feedback
randomness