in reply to Unidecode fails printing french accents
You should show how you get data into your $var. Most likely you have sequence of octets there instead of Unicode characters. Because of that Text::Unidecode fails, it expects sequence of Unicode characters as input.
In Section
Seekers of Perl Wisdom