Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6559443

Support for the Cyrillic MIK encoding

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 7
    • core-libs

      A DESCRIPTION OF THE REQUEST :
      Sun's JDK should add support for the MIK encoding.
      MIK is a legacy 8 bit Cyrillic encoding used in Bulgaria.
      For more information:
      http://en.wikipedia.org/wiki/MIK

      I would like to volunteer to provide the implementation.

      I have already provided a similar implementation to GNU libc.
      As GNU Classpath can use encodings provided by GNU libc, GNU Classpath supports this encoding. Sun's Java API implementation currently does not.

      I will attach a patch to this bug when implementation is ready.

      JUSTIFICATION :
      MIK is a encoding used predominantly in Bulgaria. However most (if not all) legacy DOS banking, transport, restaurant, database etc. applications use it.

      As more and more legacy applications will be transferred to other technologies, it is desirable that Sun's java implementation should support it out of the box.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      OpenJDK should support the MIK encoding.
      ACTUAL -
      Currently it does not support MIK character encoding.

      ---------- BEGIN SOURCE ----------
      import java.io.UnsupportedEncodingException;

      public class nomik {

          public static void main(String []args) throws UnsupportedEncodingException {
              byte []buffer = "Hello World".getBytes("MIK"); // UnsupportedEncodingException thrown
              for (byte b : buffer) {
                  System.out.println(b >= 0 ? b : b + 128);
              }
          }
      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Custom made decoder.

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

              Created:
              Updated:
              Imported:
              Indexed: