Bufferedreader and files encoded through ASCII

I've got to read a file (it contains text) encoded through ASCII. I decided to use Bufferedreader class. I know that, when I deal with files encoded through UTF-8, I can specify the encoding using Bufferedreader. When I deal with ASCII files have I to specify the encoding type?

Thanks

Alessio

Jon Skeet
people
quotationmark

No, you should specify an encoding using InputStreamReader - BufferedReader doesn't let you specify the encoding.

For ASCII files you're likely to be okay with the platform default encoding (most defaults are compatible with ASCII), but personally I think it's best practice to always explicitly specify the encoding - it makes it clear what your intentions are, and that you really thought about it.

people

See more on this question at Stackoverflow