-
Bug
-
Resolution: Duplicate
-
P3
-
5.0u8
-
None
-
x86
-
solaris
For following IBM encodings: x-IBM33722 and x-IBM964 that are listed in jdk1.5 documentation as supported encodings InputStreamReader misses every third character while reading them from FileInputStream char by char. I attached source of java application that demonstrates this problem and here's output from this application:
JIS_X0212-1990 failed. Pattern: '0123456789', line read char by char by InputStreamReader: '?????', line read by BufferedReader: '?????'
x-IBM33722 failed. Pattern: '0123456789', line read char by char by InputStreamReader: '0134679', line read by BufferedReader: '0123456789'
x-IBM834 failed. Pattern: '0123456789', line read char by char by InputStreamReader: '??????????', line read by BufferedReader: '??????????'
x-IBM964 failed. Pattern: '0123456789', line read char by char by InputStreamReader: '0134679', line read by BufferedReader: '0123456789'
x-JIS0208 failed. Pattern: '0123456789', line read char by char by InputStreamReader: '?????', line read by BufferedReader: '?????'
x-MacDingbat failed. Pattern: '0123456789', line read char by char by InputStreamReader: '??????????', line read by BufferedReader: '??????????'
Here are two supported encodings - x-IBM33722 and x-IBM964 for which BufferedReader and InputStreamReader read different lines:
"..line read char by char by InputStreamReader: '0134679', line read by BufferedReader: '0123456789'"
This problem reproducible on jdk1.5 (build 1.5.0_08-b03). In jdk1.6 (build 1.6.0-beta2-b86) it was fixed.
JIS_X0212-1990 failed. Pattern: '0123456789', line read char by char by InputStreamReader: '?????', line read by BufferedReader: '?????'
x-IBM33722 failed. Pattern: '0123456789', line read char by char by InputStreamReader: '0134679', line read by BufferedReader: '0123456789'
x-IBM834 failed. Pattern: '0123456789', line read char by char by InputStreamReader: '??????????', line read by BufferedReader: '??????????'
x-IBM964 failed. Pattern: '0123456789', line read char by char by InputStreamReader: '0134679', line read by BufferedReader: '0123456789'
x-JIS0208 failed. Pattern: '0123456789', line read char by char by InputStreamReader: '?????', line read by BufferedReader: '?????'
x-MacDingbat failed. Pattern: '0123456789', line read char by char by InputStreamReader: '??????????', line read by BufferedReader: '??????????'
Here are two supported encodings - x-IBM33722 and x-IBM964 for which BufferedReader and InputStreamReader read different lines:
"..line read char by char by InputStreamReader: '0134679', line read by BufferedReader: '0123456789'"
This problem reproducible on jdk1.5 (build 1.5.0_08-b03). In jdk1.6 (build 1.6.0-beta2-b86) it was fixed.
- duplicates
-
JDK-6371619 CharsetDecoder.decode of Cp964 fails for single-byte input
- Resolved