i wa trying to solve my problem with the help of the big boards, but it was no use, so i'll try to get a solution on this rather tiny one

I am currently coding an email-client. it has main functionality already. I am able to show all the stuff that has been sent with the email. but unfortunately, i don't know how to handle the charsets.
When you receive an email, it is (if necessary) encoded in a certain charset. The encoding charset is always given with header of the email, so its not an issue to find out which character set i need.
But what comes after that ? Where to do i have to convert the given text encoded in the given charset ? And how do i convert ? Please help me doing this...it is the last thing i have to work on for my email client.