perl-unicode

Re: Silence “Wide character” warning globally one time

2010-08-02 17:20:15
* Michael Ludwig <milu71(_at_)gmx(_dot_)de> [2010-07-30 01:20]:
You need the equivalent of -CO in your script:

  binmode STDOUT, ':utf8';

Argh, no, unfortunately not. The `:utf8` layer is bad. It does
the equivalent of `_utf8_on` on input and `_utf8_off` on output,
without actually decoding or (worse) encoding anything.

You want `:encoding(UTF-8)`.

-- 
*AUTOLOAD=*_;sub _{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1}
&Just->another->Perl->hack;
#Aristotle Pagaltzis // <http://plasmasturm.org/>

<Prev in Thread] Current Thread [Next in Thread>
  • Re: Silence “Wide character” warning globally one time, Aristotle Pagaltzis <=