IzPack
  1. IzPack
  2. IZPACK-433

ShortcutPanel fails to load if shortcutSpec.xml is UTF-8 encoded and contains non-ascii characters

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.3.0
    • Fix Version/s: 4.3.4, 5.0
    • Component/s: Installer
    • Labels:
      None
    • Environment:
      German Windows, Java default encoding Windows-1252
    • Number of attachments :
      0

      Description

      The ShortcutPanel fails to load if shortcutSpec.xml is UTF-8 encoded and contains non-ascii characters that are correctly encoded in the XML file.
      Error message: FEHLER: 'Invalid byte 1 of 1-byte UTF-8 sequence.'
      The problem is caused by com.izforge.izpack.adaptator.impl.XMLParser:
      public IXMLElement parse( String inputString )

      { return parse(new ByteArrayInputStream(inputString.getBytes())); }

      getBytes() uses the current codepage, but the XML is UTF-8 by default.
      I suggest this implementation:
      public IXMLElement parse( String inputString )

      { InputSource inputSource = new InputSource( new CharArrayReader( inputString.toCharArray())); DOMResult result = parseLineNrFromInputSource( inputSource ); return searchFirstElement( result ); }

        Activity

        Hide
        Roman Platonov added a comment -

        Hi!
        Is it any workaround for this problem?
        My project in Russian language, and izpack installer fails to load if shortcutSpec.xml in UTF-8 encoding, but I need for Russian words in it.

        Show
        Roman Platonov added a comment - Hi! Is it any workaround for this problem? My project in Russian language, and izpack installer fails to load if shortcutSpec.xml in UTF-8 encoding, but I need for Russian words in it.
        Hide
        Lauri Korpela added a comment -

        This sounds like a duplicate of IZPACK-422

        Show
        Lauri Korpela added a comment - This sounds like a duplicate of IZPACK-422
        Hide
        Timothy Fridey added a comment -

        Looks like this should be marked as fixed.

        Fixed since 4.3.2 see: IZPACK-422

        Show
        Timothy Fridey added a comment - Looks like this should be marked as fixed. Fixed since 4.3.2 see: IZPACK-422

          People

          • Assignee:
            Julien Ponge
            Reporter:
            Andreas Vef
          • Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: