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.


In reply to Re: Unicode to entity by Louis_Wu
in thread Unicode to entity by jdinesh

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.