HEX
Server: Apache
System: Linux server-674799.igrow.ws 5.14.0-611.30.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 11 06:42:00 EST 2026 x86_64
User: elrashedytravel (1025)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/.cpan/build/URI-5.29-0/t/escape-char.t
use strict;
use warnings;

# see https://rt.cpan.org/Ticket/Display.html?id=96941

use Test::More;
use URI ();

TODO: {
    my $str = "http://foo/\xE9";
    utf8::upgrade($str);
    my $uri = URI->new($str);

    local $TODO = 'URI::Escape::escape_char misunderstands utf8';

    # http://foo/%C3%A9
    is("$uri", 'http://foo/%E9', 'correctly created a URI from a utf8-upgraded string');
}

{
    my $str = "http://foo/\xE9";
    utf8::downgrade($str);
    my $uri = URI->new($str);

    # http://foo/%E9
    is("$uri", 'http://foo/%E9', 'correctly created a URI from a utf8-downgrade string');
}

done_testing;