• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Relation between char-set and encoding

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all
Can you please describe the relations between "Character-Set" and "Encoding" ?
thanks
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am not very sure if this is helpful to you at all
I am not sure if your talking about encoding or character encoding. Because i think there is no relation in char-set and encoding but there is relation between char-set and charencoding
encoding - is the transformation that happens on complete content while sending it from server to client. examples are like compression.In case if you want to write a image to output stream then also you need to do output encoding
char-set - Once you get content it will be big stream of bits.So you will use char character set encoding to find out what char-set is used say it may be UCS-2 then you can treat 2bytes as character if it is UTF-8 then character can be 1 to 3 bytes.
So you will read those many bytes in content and try to find out displayable character for it in corresponding conversion table for that character.
Hope this helps
Sunil
 
E. Messing
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your answer..
What I mean is that I know char-sets are used to translate bits to symbols of a language. And I know UTF-8 is a char-set. And in the HTML you can set the char-set of a page.
So why in the browser, you can change the char-set of the page using "View->ENCODING" ??? why is it called Encoding in the menu ? What is the meaning of encoding in that context ?
thanks
 
Sunil Patil
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have Oreillys java servlet programming book and this is what it says.


Somehow you browser should understand how to interpret response it is getting this can be done in one of the two ways.
1) You can required user to tell you the character set in case of browser it can be done by view encoding setting and user can try different character set till the response(display) makes sense for him
2) You can set charset in content-type header


Sunil
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic