[Bug 1048324] Reference to perl (5.18.1-288.fc20.x86_64) utf8 string is Invalid Argument to open
bugzilla at redhat.com
bugzilla at redhat.com
Tue Jan 7 14:33:51 UTC 2014
https://bugzilla.redhat.com/show_bug.cgi?id=1048324
Petr Pisar <ppisar at redhat.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |CLOSED
URL| |https://rt.perl.org//Public
| |/Bug/Display.html?id=109828
Resolution|--- |NOTABUG
Last Closed| |2014-01-07 09:33:51
--- Comment #1 from Petr Pisar <ppisar at redhat.com> ---
The truth comes when running the code with enabled warnings:
# perl -we 'my $s = qq{\x{2019}}; open(my $f, q{<}, \$s) or die $!' 2>&1 |
splain
Strings with code points over 0xFF may not be mapped into in-memory file
handles (#1)
(W utf8) You tried to open a reference to a scalar for read or append
where the scalar contained code points over 0xFF. In-memory files
model on-disk files and can only contain bytes.
This is result of
commit b38d579d7e4fdb6e4abade72630ea777d8c509d9
Author: Tony Cook <tony at develop-help.com>
Date: Fri Jan 25 09:56:01 2013 +1100
handle reading from a SVf_UTF8 scalar
if the scalar can be downgradable, it is downgraded and the read succeeds.
Otherwise the read fails, producing a warning if enabled and setting
errno/$! to EINVAL.
which comes from perl bug report
<https://rt.perl.org//Public/Bug/Display.html?id=109828>.
The overall conclusion is that file consists always of bytes.
If you don't agree, please open a request at upstream
<https://rt.perl.org/Public/>.
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=AHIMw7gBvd&a=cc_unsubscribe
More information about the perl-devel
mailing list