I believe the best practice is still doing it on case-by-case basis, at least when dealing with external data, since you never know what you'll get. Utf8 might be widespread but it's not like the other encodings are not used. As for automatic support, I guess this is as far as you can really go:
use utf8; use open ':encoding(UTF-8)';
This will allow you to write unicode strings into the source and automatically handle encoding/decoding on read/write in new filehandles. Mind that if you read data from databases, external APIs or whatever other source that is not a filehandle, you will still need to set the specific options or decode it yourself, it will all the depend on the library used. Unfortunately, there is no one magic setting which will set everything to utf8.

In reply to Re: utf8 forever OR what are the best practices ...? by kroach
in thread utf8 forever OR what are the best practices ...? by pcouderc

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.