-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
6
-
x86
-
windows_xp
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 ----------
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 ----------
- duplicates
-
JDK-8166257 Invalid conversion for PUA on x-windows-50220 and x-windows-50221
- Open