All You Need to Know About Encodings and Ruby 1.9
yehudakatz.com
yehudakatz.com
The problem is that humans communicate with characters, not bytes. And so you need a function to convert bytes to characters and characters to bytes, so that human conversations can happen on top of computer conversations.
Once you understand "why" you need to encode/decode, then everything else is simple.