[Bug 1048324] Reference to perl (5.18.1-288.fc20.x86_64) utf8 string is Invalid Argument to open

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1048324



--- Comment #2 from Ross Tyler <rossetyler@xxxxxxxxx> ---
Thanks for the explanation and link.

For the benefit of others,
What is wrong with:

perl -we 'my $s = qq{\x{2019}}; open(my $f, q{<}, \$s) or die $!'

is that it would make assumptions about the perl internal string representation
that the language does not guarantee.

Instead an explicit encoding/decoding must be done:

perl -we 'use Encode; my $s = encode(q{utf8}, qq{\x{2019}}); open(my $f,
q{<:utf8}, \$s) or die $!'

-- 
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=Zp8JaoyLyV&a=cc_unsubscribe
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/perl-devel





[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux