need charset alias for ISO-2022-CN.

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 1.1.6
    • Component/s: core-libs
    • None

      as part of:
      String.getBytes(String charset)

      you cannot use "ISO-2022-CN" which is a valid MIME charset name. Even though Java supports the charset. The JDK has a different name for it, "ISO2022CN".

      An alias for it needs to be added to sun.io.CharacterEncoding:

      just add the line:
              aliasTable.put("iso-2022-cn", "ISO2022CN");

      ===========
      The same goes for "ISO-2022-KR". Need the following line for that one:
              aliasTable.put("iso-2022-kr", "ISO2022KR");

      ===========
      The same goes for "UTF-8". Need the following line for that one:
              aliasTable.put("utf-8", "UTF8");
              aliasTable.put("utf8", "UTF8");

      you need the second one in case someone uses a lower case "utf8" it will not find the correct one.

            Assignee:
            Zhenghua Li (Inactive)
            Reporter:
            J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: