in reply to EncodingConversion in perl

To supplement the excellent advice given above, I'd like to add that you should take care to know your display tools really well, to make sure that valid utf8 data is displayed correctly. This involves whatever text editor, terminal window, browser or other display method you use to check your data. It can also be a good idea to have two or more independent ways to look at the contents of the database.

It will help to have tools that allow you to view utf8 text data in a more detailed, explicit manner -- for example (shameless plug), I posted a couple command-line scripts that can help for both confirming valid utf8 data and diagnosing faulty data: tlu -- TransLiterate Unicode, and unichist -- count/summarize characters in data. They might help you in figuring out a suitable idiom for handling your text data in a way that avoids corruption.