What is Encoding and Character conversion?
What is US-ASCII to UTF-8 encoding and UTF8
suppose, I want to encode the US-ASCII data into UTF-8.
For that what is the procedure.
I have to use
1.InputStreamReader and OutPutStreamReader
2.Charset/CharsetEncoder/CharsetDecoder . Is is right?
What is the difference between the two processes?
Process 1:
Read ASCII data and store into some
string object
FileOutputStream fos = new FileOutputStream(outputFile);
OutputStreamWriter osw = new OutputStreamWriter(fos, "UTF-8");
Process 2:
Charset charset = Charset.forName(encode);
CharsetDecoder decoder = charset.newDecoder();
CharsetEncoder encoder = charset.newEncoder();
my question is:
is InputStreamReader, OutputStreamWriter and CharsetDecoder &CharsetEncoder are for the same purpose.or they different functionality?