Here are some resources about Unicode, handling special characters and the importance to care for data encoding when writing code:
First there’s Joel Spolsky’s classical article about Unicode and Character sets: The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!). Read it to get a feeling for the importance of knowing how data is encoded.
Then there’s this great comment by Tom Christiansen to a Stack Overflow question about using UTF-8 in Perl.
A large part is Perl specific and if you want an in in-depth analysis about things you have to consider while writing Perl code go ahead an read it.
But it includes a part, called Assume Brokenness, that lists a large number of points of interest that apply to almost every programming language.
The writer of the comment also has a presentation about Unicode support and pitfalls in several programming languages: Unicode Support Shootout – The Good, the Bad, & the (mostly) Ugly (HTML presentation / PDF).