Perl’s -e ignores the internal UTF8 flag. (See 
<http://rt.perl.org/rt3/Ticket/Display.html?id=77242>.)

LWP::Protocol::file triggers this bug in this piece of code:

    # test file exists and is readable
    unless (-e $path) {
        return new HTTP::Response &HTTP::Status::RC_NOT_FOUND,
                                  "File `$path' does not exist";
    }

If you add
    $path =~ /[^\0-\xff]/ or utf8::downgrade($path); # work around perl bug 
#77242
before the ‘unless’ statement, it works.

Reply via email to