Jump to content
  • JRXML encoding not UTF-8 compliant


    SavedLinuXgeeK
    CategoryBug report
    PriorityUrgent
    ReproducibilityAlways
    ResolutionOpen
    SeverityCritical
    StatusAssigned
    In iReport the two optiosn for encoding of an xml file are UTF-8 or IS0-8859-1. The issue arises when you use the pattern "wizzard" for text field boxes. When you use the pattern for currency, a specfic character is used as the marker for the currency symbol '¤'. This character is handled by the code, throuth the Xerces Dom parser. When trying to load the jrxml file, with this character in it, through the org.xml.sax parser, it throws an exception stating that the character is not a valid UTF-8 character. The locale seems to have no effect, nor the encoding, because when the xml file, that contains the erring character, is forced to be utf-8, the character breaks, and is changed into another, showing that it is not a valid UTF-8 character. An image is attached showing the invalid currency character coming up in the latest version of iReport.

    Attachments:

    User Feedback

    Recommended Comments

    The character is in FieldPatternDialog.java, at line 936 in the 1.2.5 release. The character is "\\u00A4". I know this is not valid utf-8, as it gets changed, but I don\'t know what encoding it is.
    Link to comment
    Share on other sites

    Well it is infact the currency symbo, which is used by formatting code in java to convert it to a local currency symbol (the "\\u00A4") that is. The only problem is the symbo is not valid when parsing the xml file as a strict utf-8 file. Don\'t know what to do about it from here.
    Link to comment
    Share on other sites

    The character in question is unicode 00A4, ant the UTF-8 encoding should be 0xC2A4. If it gets written out as 00A4 that IS wrong, as it isn\'t being encoded to UTF-8 correctly.
    Link to comment
    Share on other sites

    I am using Win32 as the platform (XP). I wasn\'t able to have the

    currency character that JasperReports uses, save in a utf-8 text editor

    as well. But UTF-8 should be platform independant, so I do not know.

    Link to comment
    Share on other sites

    Hi Giulio,

     

    I\'ve got a board meeting most of today, so I\'ll run this test again later

    and send you the JRXML if I still see the problem.

     

    -Barry

     

     

    On 11/15/06 2:46 AM, "JasperForge Administrator"

    wrote:

     

    >

    artf1525: JRXML encoding not UTF-8 compliant

     

    Modified on 11/15/2006 by

    > Giulio Toffoli

    Assigned To: - New: "Giulio Toffoli" Old: "No user"

     

    Comment

    > was added:

    On my system it works and no exception is thrown.

    >

    > What OS are you using?

    >

    > Giulio

     

    Respond by

    > visiting:

    http://www.jasperforge.org/sf/go/artf1525

     

    -------------------------

    > --------------------------------------------

    Artifact details:-

     

    Project:

    > iReport

    Tracker: Bugs

     

    Group:

    Status: Open

    Category:

    Customer:

    Priority:

    > 2

    Assigned To: Giulio Toffoli

    Reported in release: none

    Fixed in release:

    > none

    Estimated Hours: 0

    Actual Hours: 0

     

    Description: In iReport the two

    > optiosn for encoding of an xml file are UTF-8 or IS0-8859-1. The issue arises

    > when you use the pattern "wizzard" for text field boxes. When you use the

    > pattern for currency, a specfic character is used as the marker for the

    > currency symbol \'¤\'. This character is handled by the code, throuth the

    > Xerces Dom parser. When trying to load the jrxml file, with this character in

    > it, through the org.xml.sax parser, it throws an exception stating that the

    > character is not a valid UTF-8 character. The locale seems to have no effect,

    > nor the encoding, because when the xml file, that contains the erring

    > character, is forced to be utf-8, the character breaks, and is changed into

    > another, showing that it is not a valid UTF-8 character. An image is

    > attached showing the invalid currency character coming up in the latest

    > version of iReport.

     

     

     

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