Author: ebourg
Date: Sun Sep 18 15:40:39 2005
New Revision: 289994
URL: http://svn.apache.org/viewcvs?rev=289994&view=rev
Log:
PropertiesConfiguration now uses the ISO-8859-1 encoding by default instead of
the system encoding to comply with the specification of java.util.Properties
(Bug 36699)
Modified:
jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/PropertiesConfiguration.java
jakarta/commons/proper/configuration/trunk/xdocs/changes.xml
Modified:
jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/PropertiesConfiguration.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/PropertiesConfiguration.java?rev=289994&r1=289993&r2=289994&view=diff
==============================================================================
---
jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/PropertiesConfiguration.java
(original)
+++
jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/PropertiesConfiguration.java
Sun Sep 18 15:40:39 2005
@@ -166,6 +166,16 @@
private String header;
/**
+ * The default encoding (ISO-8859-1 as specified by
http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html)
+ */
+ private static final String DEFAULT_ENCODING = "ISO-8859-1";
+
+ // initialization block to set the encoding before loading the file in the
constructors
+ {
+ setEncoding(DEFAULT_ENCODING);
+ }
+
+ /**
* Creates an empty PropertyConfiguration object which can be
* used to synthesize a new Properties file by adding values and
* then saving().
@@ -586,7 +596,7 @@
* <p>Unescapes any Java literals found in the <code>String</code> to a
* <code>Writer</code>.</p> This is a slightly modified version of the
* StringEscapeUtils.unescapeJava() function in commons-lang that doesn't
- * drop escaped commas (i.e '\,').
+ * drop escaped separators (i.e '\,').
*
* @param str the <code>String</code> to unescape, may be null
*
Modified: jakarta/commons/proper/configuration/trunk/xdocs/changes.xml
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/configuration/trunk/xdocs/changes.xml?rev=289994&r1=289993&r2=289994&view=diff
==============================================================================
--- jakarta/commons/proper/configuration/trunk/xdocs/changes.xml (original)
+++ jakarta/commons/proper/configuration/trunk/xdocs/changes.xml Sun Sep 18
15:40:39 2005
@@ -23,6 +23,11 @@
<body>
<release version="1.2-dev" date="in SVN">
+ <action dev="ebourg" type="update" issue="36699">
+ PropertiesConfiguration now uses the ISO-8859-1 encoding by default
+ instead of the system encoding to comply with the specification of
+ java.util.Properties.
+ </action>
<action dev="ebourg" type="update" issue="36664">
JNDIConfiguration no longer logs an error when attempting to get
a property that doesn't exist in the configuration.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]