Well, the shebang line and the "use utf8" line shouldn't actually contain any characters that utf8 will encode
differently than ascii will. (This is actually one of the nice things about utf8 encoding... all of the standard 7-bit ascii characters have the exact same single-byte encoding... while other characters have different, and potentially multi-byte, encodings.)
The perl interpretter, much like many other applications, will read, assuming 7-bit ascii or utf8 (it doesn't really matter, if all of the characters fall within the subset that they encode the same way) up to the line that specifies the encoding. The only problem you should have is if you have any non-7-bit-ascii characters before the "use utf8" line.
It may be a pain... but can you look at the first couple lines of your source through a hex-dumper, and see if your "utf-encoded" and non "utf-encoded" source are identical, byte-for-byte, for those first few lines?
Oh, it could also be a version problem. If your perl interpretter is pre-5.6, then I don't think it recognizes (high-bit-set) utf8.
------------
:Wq
Not an editor command: Wq
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.