develooper Front page | perl.perl5.porters | Postings from April 2018

Re: [perl #133101] Anomalies in handling malformed utf8 input

Thread Previous | Thread Next
From:
Dan Book
Date:
April 11, 2018 21:35
Subject:
Re: [perl #133101] Anomalies in handling malformed utf8 input
Message ID:
CABMkAVXnpFu5Pvcd6JQ084hAVBMz4JU_7zXMxU_Ad+LsK3MuQw@mail.gmail.com
On Wed, Apr 11, 2018 at 4:52 PM, Dan Book <grinnz@gmail.com> wrote:
>
>
> Yes. -CAS only sets @ARGV to be interpreted as UTF-8 and :utf8 layers on
> STDIN/STDOUT/STDERR. The source code still needs `use utf8;` to be
> interpreted correctly.
>
> -Dan
>

Using the options -CSD (-CD makes the special ARGV handle used by -n open
the passed filename with :utf8, -CS interprets the STDIN with :utf8) and
-Mutf8 (for the source code passed to -e) should make these examples
function as expected.

-Dan

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About