I have found a bug connected to write/read of a file in
The mistake is shown that all symbols which are not
getting in a range
32-127 are incorrectly read.
The mistake is covered in not symmetric use
Reader/Writer. At writing it
is used DataOutputStream+FileOutputStream and the text
is kept in an
DataOutputStream dos = new DataOutputStream(
For reading it is used
fis = new FileInputStream(filename);
bf = new BufferedReader(new InputStreamReader(fis));
StringBuffer sb = new StringBuffer(2048);
while((str = bf.readLine()) != null)
InputStreamReader reads files in view of system
encoding. For correct
work it is necessary to synchronize use Reader/Writer.
I think use
DataOutput* inexpedient - it is impossible to read/edit
a file other
programs. IMHO it is better to use:
In this case problems with encoding should not be.
Log in to post a comment.