Commons Configuration
  1. Commons Configuration
  2. CONFIGURATION-13

[configuration] XMLConfiguration ignore a specific encoding in XML declaration

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

      Description

      I found that usign ConfigurationFactory, XMLConfiguration can't recognize a
      specific encoding in XML declaration because of calling method
      "load(Reader in)" anytime, so I can use only one encoding depend on OS through
      all xml files.

      After finding this problem, I modified implementation to create
      org.w3c.dom.Document by calling
      "DocumentBuilder#parse(new InputSource(Inputstrem in))" to avoid characters
      garbled (gobbledygook), and then I confirmed to be recoginzed encoding.

      I suggest to correct methods which inner class FileConfigurationDelegate in
      XMLConfiguration change to override "load(Inputstrem in)", and
      call "XMLConfiguration.this.load(Inputstrem in);", and method
      "load(InputStream in)" in XMLConfiguration change to call
      "DocumentBuilder#parse(new InputSource(Inputstrem in))".

        Activity

        kunihara tetsuya created issue -
        Henri Yandell made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 34204 12342141
        Henri Yandell made changes -
        Key COM-1989 CONFIGURATION-13
        Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
        Affects Version/s 1.0 Final [ 12311651 ]
        Component/s Configuration [ 12311107 ]
        Project Commons [ 12310458 ] Commons Configuration [ 12310467 ]
        Henri Yandell made changes -
        Affects Version/s 1.0 Final [ 12311736 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            kunihara tetsuya
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development