So... for this example you don't actually have any unicode characters at all, right? Your __DATA__ is using html entities written in ASCII, and all the literals are also ASCII. And the emoji still doesn't come through?
For debugging, you can always "view source" in your mail client (well, usually, or maybe you need to install Thunderbird). The source of the email should reveal if something broke your HTML.
When you get past this first hurdle though, and go back to using Unicode characters, you should:
- Decode the CGI parameters into unicode strings
- Make sure your DBI was connected with option { mysql_enable_utf8 => 1 }
- Declare your content types as text/html; charset=UTF-8 or text/plain; charset=UTF-8
- Put use utf8; at the top of the script if any of your literals have a non-ASCII character.
- Encode the headers (if there's any chance they contain non-ASCII)
- 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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
- Link using PerlMonks shortcuts! What shortcuts can I use for linking?
-
See Writeup Formatting Tips and other pages linked from there for more info.