-
Bug
-
Resolution: Fixed
-
P2
-
1.1.1
-
b01
-
x86
-
solaris_9
-
Not verified
takeshi.asano@Japan 1997-03-19
If the last character passed to ByteToCharJIS is JIS X 0201 Kana
(aka Hankaku Kana) encoded in SI/SO style switching,
the converter cannot convert it.
(i) If very last (i.e. no newline follows) character is JIS X 0201 Kana,
the converter puts garbage output.
asano@soda[762]$ od -c allkana.nonl.jis
0000000 016 1 2 3 4 5 017
0000007
asano@soda[763]$ java InOut JIS EUCJIS < allkana.nonl.jis | od -c
0000000 216 261 216 262 216 263 216 264 216 265 243 357
^^^^^^^ garbage
0000014
(ii) If last character is JIS X 0201 Kana and a newline follows it,
the converter generates InternalError
asano@soda[764]$ od -c allkana.jis
0000000 016 1 2 3 4 5 017 \n
0000010
asano@soda[765]$ java InOut JIS EUCJIS < allkana.jis | od -c
java.lang.InternalError: Converter malfunction (JIS) -- please send a bug report to ###@###.###
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Error.<init>(Compiled Code)
at java.lang.VirtualMachineError.<init>(Compiled Code)
at java.lang.InternalError.<init>(Compiled Code)
at java.io.InputStreamReader.malfunction(Compiled Code)
at java.io.InputStreamReader.convertInto(Compiled Code)
at java.io.InputStreamReader.fill(Compiled Code)
at java.io.InputStreamReader.read(Compiled Code)
at java.io.InputStreamReader.read(Compiled Code)
at InOut.main(Compiled Code)
0000000 216 261 216 262 216 263 216 264 216 265
0000012
I attached files "InOut.java", "allkana.jis", and "allkana.nonl.jis"
for reproduction.