Greetings Perl Monk People, I've been asked to decrypt and unescape MIME headers that ar written to our log file. These are encoded in the Blowfish encryption algorhythm, and look something similar to this:
$tmp ="IPPQY%FF%B3M/%u2030%u2014s%FE%07%8D%1E%D3%27j ... [snip]";
The problems are encountered when the UTF16 character (eg %u2030) are encountered, which are not correctly unescaped back to the character they are meant to represent. Am I using the correct module for this function? Or am I better to write a series of Regex's that do something like:
$tmp2 =~ s/\%u2030/\x137/gi;
If the latter is the case, could someone point me to a URL that lists these codes and their appropriate hex values. Thanks for your time - my sanity can still be saved ... !! Richard

In reply to Decoding MIME headers with URI::Escape for extended character set by richard_mortimer

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.