What version of Perl are you using? With Perl 5.6, HTML::Entitites seems to encode the UTF-8 bytes. With Perl 5.8, it encodes Unicode strings properly.
I am sending UTF-8 in the character set parameter of the HTTP header. When I print the $variables as they are, e.g a chinese character, the browser renders them just fine. But if I apply the HTML::Entity encoding then it shows gibbrish.
Now that I think about it, maybe I should not be sending UTF-8 in the HTTP header when I'm using HTML::Entities.