Commons Configuration
  1. Commons Configuration
  2. CONFIGURATION-345

PropertiesConfiguration does not use the default encoding to load files

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: 1.6
    • Component/s: None
    • Labels:
      None
    • Environment:

      Win XP / Sun JVM 1.5.0_14

      Description

      The piece of code

      PropertiesConfiguration.java
          // initialization block to set the encoding before loading the file in the constructors
          {
              setEncoding(DEFAULT_ENCODING);
          }
      

      seems to set correctly the default encoding, but this block is called after "super()" in constructors.

      So when using either PropertiesConfiguration(java.io.File file), PropertiesConfiguration(java.lang.String fileName) or PropertiesConfiguration(java.net.URL url), the super() statement is called, and it loads the file without the default encoding.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Oliver Heger
            Reporter:
            Guillaume Darmont
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development