On Thu, Jul 28, 2016 at 10:23:19AM -0400, Chas. Owens wrote:
> On Thu, Jul 28, 2016 at 10:05 AM, hw <[email protected]> wrote:
> snip
> > So which character encoding on STDOUT does perl use by default?  That should
> > be utf-8 without any further ado, shouldn´t it?  When I add
> >
> >
> > binmode STDOUT, ":encoding(utf-8)";
> >
> >
> > the characters are displayed correctly in the terminal.  Why would perl use
> > something else than utf-8 by default?

As a general rule, use "utf8::all" instead of just "utf8" and a lot of
the problems go away.

> Also, this answer on StackOverflow by tchrist (Tom Christiansen, who I
> would say knows the most about the intersection of Perl and Unicode)
> is a good resource: http://stackoverflow.com/a/6163129/78259

Quite.  And utf8::all tries to encapsulate as much of that boilerplate
as it can.

-- 
Paul Johnson - [email protected]
http://www.pjcj.net

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/


Reply via email to