tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/util CharsetMapper.java
Date Wed, 05 Jan 2005 10:00:45 GMT
remm        2005/01/05 02:00:45

  Modified:    catalina/src/share/org/apache/catalina/util
                        CharsetMapper.java
  Log:
  - Also match laguage_country. This seemed to have been missing.
  
  Revision  Changes    Path
  1.7       +8 -3      jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/util/CharsetMapper.java
  
  Index: CharsetMapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/util/CharsetMapper.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- CharsetMapper.java	5 Jan 2005 09:36:46 -0000	1.6
  +++ CharsetMapper.java	5 Jan 2005 10:00:45 -0000	1.7
  @@ -100,10 +100,15 @@
        * @param locale The locale for which to calculate a character set
        */
       public String getCharset(Locale locale) {
  -        // Match full language_country_variant first, then language only
  +        // Match full language_country_variant first, then language_country, 
  +        // then language only
           String charset = map.getProperty(locale.toString());
           if (charset == null) {
  -            charset = map.getProperty(locale.getLanguage());
  +            charset = map.getProperty(locale.getLanguage() + "_" 
  +                    + locale.getCountry());
  +            if (charset == null) {
  +                charset = map.getProperty(locale.getLanguage());
  +            }
           }
           return (charset);
       }
  
  
  

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


Mime
View raw message