• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

What is Encoding and character conversion

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
ssaharshitha bobba
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1)What is Encoding and Character conversion?

2)InputStreamReader, OutputStreamWriter and CharsetDecoder &CharsetEncoder are for the same purpose.or they different functionality?
 
Grow a forest with seedballs and this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic