develooper Front page | perl.perl5.porters | Postings from May 2010

Re: [perl #75106] binmode $fh, ":raw" doesn't undo :utf8 on win32

Thread Previous | Thread Next
From:
Eric Brine
Date:
May 15, 2010 10:52
Subject:
Re: [perl #75106] binmode $fh, ":raw" doesn't undo :utf8 on win32
Message ID:
AANLkTilSJ0k0VLCFtdl_GAICfs_KY9uKciCYL2kv6cz-@mail.gmail.com
On Fri, May 14, 2010 at 7:55 PM, Tatsuhiko Miyagawa <
perlbug-followup@perl.org> wrote:

> # New Ticket Created by  "Tatsuhiko Miyagawa"
> # Please include the string:  [perl #75106]
> # in the subject line of all future correspondence about this issue.
> # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=75106 >
>
>
> The following test fails on win32 systems on perl 5.8.9, 5.10.1 and
> 5.12.0, whereas it passes fine on other systems like Linux or Mac OS
> X. It looks like binmode $t, ":raw" doesn't have any effect of taking
> away ":utf8". Per my discussion with jdb at #p5p, i'm filing a bug
> report.
>

As a workaround, change

binmode $t, ":utf8";

to

binmode $t, ":encoding(UTF-8)";

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