What's the difference between encoding and charset?

TK. picture TK. · Feb 17, 2010 · Viewed 44.3k times · Source

I am confused about the text encoding and charset. For many reasons, I have to learn non-Unicode, non-UTF8 stuff in my upcoming work.

I find the word "charset" in email headers as in "ISO-2022-JP", but there's no such a encoding in text editors. (I looked around the different text editors.)

What's the difference between text encoding and charset? I'd appreciate it if you could show me some use case examples.

Answer

Svetlozar Angelov picture Svetlozar Angelov · Feb 17, 2010

Basically:

  1. charset is the set of characters you can use
  2. encoding is the way these characters are stored into memory