Provide names of supported charsets

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P5
    • None
    • Affects Version/s: 7
    • Component/s: core-libs

      A DESCRIPTION OF THE REQUEST :
      Charset.availableCharsets() returns completely initialized charset, which is an expensive operation.

      I propose to additionally provide a set/list which only contains the names of the supported charsets.

      JUSTIFICATION :
      Charset.availableCharsets() is an performance and memory expensive operation.

      In many cases just providing the names should suffice.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      provides a list/set of names, optionally including all aliases, of supported charsets.

      ---------- BEGIN SOURCE ----------
      public class Charset {
          /**
           * Returns a list of the names of currently available charsets
           * with or without valid aliases in case insensitive order.
           */
          public static List<String> supportedCharsets(boolean withAliases);
          /**
           * Returns a list of arrays containing the aliases of currently available charsets
           * in same order than canonical names without aliases from supportedCharsets.
           */
          public static List<String[]> supportedAliases();
          ...
      }

      ---------- END SOURCE ----------

            Assignee:
            Unassigned
            Reporter:
            Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: