/[classpath]/classpath/gnu/java/io/EncodingManager.java
ViewVC logotype

Diff of /classpath/gnu/java/io/EncodingManager.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7.2.5 by gnu_andrew, Sun Mar 13 14:38:25 2005 UTC revision 1.7.2.6 by gnu_andrew, Sun Apr 3 00:09:10 2005 UTC
# Line 169  private static Constructor findDecoderCo Line 169  private static Constructor findDecoderCo
169      throws UnsupportedEncodingException      throws UnsupportedEncodingException
170  {  {
171    // First check for an aliased encoding name    // First check for an aliased encoding name
172    encoding = SystemProperties.getProperty("gnu.java.io.encoding_scheme_alias." +    encoding = resolveAlias(encoding);
                                     encoding, encoding);  
173    
174    StringTokenizer st = new StringTokenizer(encoding_path, ":");    StringTokenizer st = new StringTokenizer(encoding_path, ":");
175    
# Line 190  private static Constructor findDecoderCo Line 189  private static Constructor findDecoderCo
189                
190  /*************************************************************************/  /*************************************************************************/
191    
192    private static String resolveAlias(String encoding)
193    {
194      String prefix = "gnu.java.io.encoding_scheme_alias.";
195      // Aliases should preferably be defined in lowercase so that they
196      // can be matched case-insensitively, but for compatibility we will
197      // first look for an exact match.
198      return SystemProperties.getProperty(prefix + encoding,
199        SystemProperties.getProperty(prefix + encoding.toLowerCase(), encoding));
200    }
201    
202  /**  /**
203    * This method loads an <code>Encoder</code> class for the given    * This method loads an <code>Encoder</code> class for the given
204    * encoding name.    * encoding name.
# Line 200  private static Constructor findEncoderCo Line 209  private static Constructor findEncoderCo
209      throws UnsupportedEncodingException      throws UnsupportedEncodingException
210  {  {
211    // First check for an aliased encoding name    // First check for an aliased encoding name
212    encoding = SystemProperties.getProperty("gnu.java.io.encoding_scheme_alias." +    encoding = resolveAlias(encoding);
                                     encoding, encoding);  
213    
214    StringTokenizer st = new StringTokenizer(encoding_path, ":");    StringTokenizer st = new StringTokenizer(encoding_path, ":");
215    

Legend:
Removed from v.1.7.2.5  
changed lines
  Added in v.1.7.2.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26