-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
1.1
-
x86
-
windows_95
masayoshi.okutsu@Eng 1997-01-09
The description below is from Fujitsu. Note that the description includes
EUCJIS characters.
--
On windows environment, exception occurs in Stdin using
BurreredReader.
Source program
import java.io.*;
public class a{
public static void main(String[] args){
InputStreamReader InputSR = new InputStreamReader(System.in);
BufferedReader BufRead = new BufferedReader(InputSR);
try{
System.out.print("Stdin a letter > ");
int i = BufRead.read();
System.out.println("Stdout a letter > "+new Character((char)i));
}
catch(IOException e){
e.printStackTrace();
}
}
}
Execution result
- PC
[F:\TEMP\io]java a
Stdin a letter > java.io.IOException
at java.io.BufferedInputStream.available(BufferedInputStream.java:181)
at java.io.InputStreamReader.fill(InputStreamReader.java:216)
at java.io.InputStreamReader.read(InputStreamReader.java:273)
at java.io.BufferedReader.fill(BufferedReader.java:141)
at java.io.BufferedReader.read(BufferedReader.java:158)
at a.main(a.java:9)
[F:\TEMP\io]
- Solaris
% java a
Stdin a letter > ñó // 'ñó'ñ‘©¢Óãž–¤
Stdout a letter > ñó
%
- duplicates
-
JDK-4023791 InputStreamReader does not work on the Win32 console input stream
-
- Closed
-