Use of default encoding: FileReader/Writer and InputStreamReader/OutputStreamWriter
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.3k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 5
Description
**Sebb** ([Bug 60855](https://bz.apache.org/bugzilla//show_bug.cgi?id=60855&redirect=false)):
FileReader and FileWriter use the default encoding, so are not really suitable for use with anything other than temporary files.
Likewise InputStreamReader & OutputStreamWriter allow the encoding to be omitted.
Files that may potentially be copied between hosts should have a defined encoding, for example UTF-8 should be a suitable default.
However, that might break some existing installations - e.g. if the ResultCollector is changed to always use UTF-8 it may be unable to read some existing result files.
It may not be possible to fix all the existing usage; in the meantime it might help to document where the code assumes the default encoding.
Severity: normal
OS: Mac OS X 10.1
Contributor guide
Assessment
This issue has not been assessed yet.