-
Bug
-
Resolution: Not an Issue
-
P5
-
None
-
1.4.2
-
generic
-
generic
The following character converters are throwing MalformedInputException. Trying to decode individual characters don't seem to cause the exception to manifest itself. It's only when a stream of bytes, which is 8192 characters in length, are trying to be decoded that this exception occurs. However, 8192 of the same characters won't cause the exception to be raised. It seems to have to be 8192 different order characters. The attached program and .b2c files demonstrates this problem. I have tried the program all the way back to 1.3.1 and the problem has been present since. The converters affected are:
Cp33722
Cp1383
Cp964
Cp970
If you send the same stream of bytes thru the String API, no exceptions are thrown. It's only with the I/O API that this occurs.
To compile/run the program:
% javac TestCoders.java
% java TestCoders Cp1383.b2c
The following exception gets thrown:
sun.io.MalformedInputException
at sun.io.ByteToCharEUC.convert(ByteToCharEUC.java:100)
at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:247)
at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:278)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:182)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.BufferedReader.fill(BufferedReader.java:136)
at java.io.BufferedReader.read(BufferedReader.java:157)
at TestCoders.<init>(TestCoders.java:47)
at TestCoders.main(TestCoders.java:9)
###@###.### 2003-03-19
Cp33722
Cp1383
Cp964
Cp970
If you send the same stream of bytes thru the String API, no exceptions are thrown. It's only with the I/O API that this occurs.
To compile/run the program:
% javac TestCoders.java
% java TestCoders Cp1383.b2c
The following exception gets thrown:
sun.io.MalformedInputException
at sun.io.ByteToCharEUC.convert(ByteToCharEUC.java:100)
at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:247)
at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:278)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:182)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.BufferedReader.fill(BufferedReader.java:136)
at java.io.BufferedReader.read(BufferedReader.java:157)
at TestCoders.<init>(TestCoders.java:47)
at TestCoders.main(TestCoders.java:9)
###@###.### 2003-03-19