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

x-windows-50220 is not same as OutlookExpress

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P4
    • Resolution: Duplicate
    • 6
    • None
    • core-libs

    Description

      FULL PRODUCT VERSION :
      java version "1.6.0-beta2"
      Java(TM) SE Runtime Environment (build 1.6.0-beta2-b79)
      Java HotSpot(TM) Client VM (build 1.6.0-beta2-b79, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      x-windows-50220 is based on result of WideCharToMultiByte and MultiByteToWideChar APIs, but Outlook Express and Internet Explorer is not base on these APIs, they are based on ConvertINetMultiByteToUnicode and ConvertINetUnicodeToMultiByte APIs (or IMultiLanguage2::ConvertStringFromUnicodeEx and IMultiLanguage2::ConvertStringToUnicodeEx).

      unfortunately, These API sets returns different result.
      ex
      MultiByteToWideChar 0x1B24422D60 -> U+301E
      ConvertINetMultiByteToUnicode 0x1B24422D60 -> U+301D

      The purpose of supporting x-windows-50220 is to process the mail from Outlook Express. the current implementation of x-windows-50220 is not fit for the purpose.


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      public class test{
          public static void main(String[] args) throws Exception {
              byte[] array = new byte[]{ 0x1B, 0x24, 0x42, 0x2D, 0x60 };
              String str = new String(array, "cp50220");
              System.out.printf( "%04X%n", str.charAt(0) & 0xFFFF );
          }
      }

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

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rmandalasunw Ranjith Mandala (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: