private void createLocaleEntry(String val){
  StringTokenizer tok1=new StringTokenizer(val,"|");
  String localeValue=null;
  LinkedList charsetList=null;
  while (tok1.hasMoreElements()) {
    String element=tok1.nextToken();
    StringTokenizer pairTok=new StringTokenizer(element,"=");
    if (pairTok.countTokens() == 2) {
      String key=pairTok.nextToken();
      key=key.trim();
      String value=pairTok.nextToken();
      if (key.equalsIgnoreCase("locale")) {
        localeValue=value.toLowerCase();
      }
      int charsetCount=0;
      if (key.equalsIgnoreCase("charset")) {
        charsetList=new LinkedList();
        StringTokenizer charsetTokenizer=new StringTokenizer(value,";");
        while (charsetTokenizer.hasMoreElements()) {
          String charsetVal=charsetTokenizer.nextToken();
          charsetList.add(charsetVal);
          charsetCount++;
        }
      }
    }
  }
  if (charsetList != null && localeValue != null) {
    localeCharset.put(localeValue,charsetList);
    if (debug.messageEnabled()) {
      debug.message("G11NSettings Locale = " + localeValue + "\tAllowed charset are "+ charsetList);
    }
  }
}

private void createLocaleEntry ( String val ) { StringTokenizer tok1 = new StringTokenizer ( val , "|" ) ; String localeValue = null ; LinkedList charsetList = null ; while ( tok1 . hasMoreElements ( ) ) { String element = tok1 . nextToken ( ) ; StringTokenizer pairTok = new StringTokenizer ( element , "=" ) ; if ( pairTok . countTokens ( ) == 2 ) { String key = pairTok . nextToken ( ) ; key = key . trim ( ) ; String value = pairTok . nextToken ( ) ; if ( key . equalsIgnoreCase ( "locale" ) ) { localeValue = value . toLowerCase ( ) ; } int charsetCount = 0 ; if ( key . equalsIgnoreCase ( "charset" ) ) { charsetList = new LinkedList ( ) ; StringTokenizer charsetTokenizer = new StringTokenizer ( value , ";" ) ; while ( charsetTokenizer . hasMoreElements ( ) ) { String charsetVal = charsetTokenizer . nextToken ( ) ; charsetList . add ( charsetVal ) ; charsetCount ++ ; } } } } if ( charsetList != null && localeValue != null ) { localeCharset . put ( localeValue , charsetList ) ; if ( debug . messageEnabled ( ) ) { debug . message ( "G11NSettings Locale = " + localeValue + "\tAllowed charset are " + charsetList ) ; } } }
load the allclientdata map with the data read from profile service . the charset values are separated by semi - colon format is locale = ja | charset = utf - 8 ; sjis ; eucjp charset values are stored in linkedlist
