in reply to Unicode to entity

These modules should help you. If these don't scratch your itch, try searching CPAN for 'Unicode'.

Unicode::CharName
Converts between the character code and the Unicode character name, and gives you the class the character belongs to.
Unicode::String
Try the $us->utf8( [$newval] ) function. To quote the description from the page:
The UTF-8 encoding use 8-bit for the encoding of characters in the range 0x0 .. 0x7F, 16-bit for the encoding of characters in the range 0x80 .. 0x7FF, 24-bit for the encoding of characters in the range 0x800 .. 0xFFFF and 32-bit for characters in the range 0x01000 .. 0x10FFFF. Americans like this encoding, because plain US-ASCII characters are still US-ASCII. Another benefit is that the character '\0' only occurs as the encoding of 0x0, thus the normal NUL-terminated strings (popular in the C programming language) can still be used.
Unicode::Map8
Quote the CPAN:
The Unicode::Map8 class implement efficient mapping tables between 8-bit character sets and 16 bit character sets like Unicode. The tables are efficient both in terms of space allocated and translation speed. The 16-bit strings is assumed to use network byte order.

BTW, I've never used these. I just searched CPAN.