commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwaldh...@apache.org
Subject cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections ExtendedProperties.java
Date Fri, 18 Apr 2003 23:17:10 GMT
rwaldhoff    2003/04/18 16:17:09

  Modified:    collections/src/java/org/apache/commons/collections
                        ExtendedProperties.java
  Log:
  address bug 17616, default to ISO-8859-1 encoding when none specified
  
  Revision  Changes    Path
  1.10      +14 -5     jakarta-commons/collections/src/java/org/apache/commons/collections/ExtendedProperties.java
  
  Index: ExtendedProperties.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/ExtendedProperties.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ExtendedProperties.java	19 Feb 2003 20:14:25 -0000	1.9
  +++ ExtendedProperties.java	18 Apr 2003 23:17:09 -0000	1.10
  @@ -472,14 +472,23 @@
               }
               catch (UnsupportedEncodingException e)
               {
  -                // Get one with the default encoding...
  +                // Another try coming up....
               }
           }
           
           if (reader == null)
           {
  -            reader =
  -                new PropertiesReader(new InputStreamReader(input));
  +            try 
  +            {
  +                reader =
  +                    new PropertiesReader(new InputStreamReader(input,"8859_1"));
  +            } 
  +            catch (UnsupportedEncodingException e)
  +            {
  +                // ISO8859-1 support is required on java platforms but....
  +                // If it's not supported, use the system default encoding
  +                reader = new PropertiesReader(new InputStreamReader(input));
  +            }
           }
   
           try
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message