code: public static String getMimeName(Locale locale)
    {
      if (locale == null)
        return "utf-8";
  
      String mimeName = _localeName.get(locale.toString());
      if (mimeName == null)
        mimeName = _localeName.get(locale.getLanguage());
  
      if (mimeName == null)
        return "utf-8";
      else
        return mimeName;
    }
docs: Returns the canonical mime name for the given locale.
  
  @param locale locale to use.
  
  @return canonical mime name for the encoding.