Hi,

I am facing issue in rendering some Chinese phrases in HTML format through emails.

北京香港马会会所

北京香港赛马会会所

I am using following code:

my $bytes = $input; my $sender = new Mail::Sender({ from => 'Sourav@ss.com', smtp => 'localhost', #! msg => $bytes, headers => "Date: ", on_errors => "die" }); my $mail_args = { to => 'Sourav.ss@ww.com', headers =>"date:", subject =>"DIP", multipart => "related" }; $mail_args->{charset}="UTF-8"; $mail_args->{b_charset}="UTF-8"; $mail_args->{encoding} ="BASE64"; $sender->OpenMultipart($mail_args); $sender->Part({ ctype => 'multipart/alternative'}); my $msg_part_args = { ctype => "text/html", disposition => "NONE", msg => $bytes, }; $msg_part_args->{charset}="UTF-8"; $msg_part_args->{b_charset}="UTF-8"; $msg_part_args->{encoding} ="BASE64"; $msg_part_args->{b_encoding} ="BASE64"; $sender->Part($msg_part_args); $sender->EndPart("multipart/alternative"); $sender->Close;

Please let me know how to solve the issue.


In reply to Chinese Character Issue in email thru HTML format by Anonymous Monk

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.