thanks a lot for your wonderful code. I can display some subjects with NON ascii stuffs. But I still can NOT display some.

For e.g - I tried with below 2 subjects. I added below subjects to your code. It will NOT work. I can't think Why? Can You try?

my $subject = "Last Day To Enjoy Extra 15% OFF On Everything For NDB C +redit Cards (raw: =?utf-8?Q?Last=20Day=20To=20Enjoy=20Extra=2015%=20O +FF=20On=20Everything=20For=20NDB=20Credit=20Cards)";
my $subject = "Sing Along and Dance with Desmond De Silva at Pegasus R +eef Hotel! (raw: =?utf-8?Q?Sing=20Along=20and=20Dance=20with=20Desmon +d=20De=20Silva=20at=20Pegasus=20Reef=20Hotel=21?)";

I did below exercise too.

I created a file /tmp/test. contents of /tmp/test

Last Day To Enjoy Extra 15% OFF On Everything For NDB Credit Cards (ra +w: =?utf-8?Q?Last=20Day=20To=20Enjoy=20Extra=2015%=20OFF=20On=20Every +thing=20For=20NDB=20Credit=20Cards) Sing Along and Dance with Desmond De Silva at Pegasus Reef Hotel! (raw +: =?utf-8?Q?Sing=20Along=20and=20Dance=20with=20Desmond=20De=20Silva= +20at=20Pegasus=20Reef=20Hotel=21?)

I ran below command. it also Will NOT work.

# cat /tmp/test | perl -MEncode=decode -ne 'print (decode("MIME-Header +", "$_"))' Last Day To Enjoy Extra 15% OFF On Everything For NDB Credit Cards (ra +w: =?utf-8?Q?Last=20Day=20To=20Enjoy=20Extra=2015%=20OFF=20On=20Every +thing=20For=20NDB=20Credit=20Cards) Sing Along and Dance with Desmond De Silva at Pegasus Reef Hotel! (raw +: =?utf-8?Q?Sing=20Along=20and=20Dance=20with=20Desmond=20De=20Silva= +20at=20Pegasus=20Reef=20Hotel=21?)

Any Idea?


In reply to Re^4: utf8 in perl by theravadamonk
in thread utf8 in perl by theravadamonk

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.