Subject: | In URI::QueryParam, the 'query_param_append' method can't append several UTF8 params. |
Hello,
In URI::QueryParam, the 'query_param_append' method can't append several UTF8 params. Each previous UTF8 param is badly reencoded.
My example script produces:
http://www.example.com?a=%C3%A9 at ./bug-uri.pl line 10.
http://www.example.com?a=%C3%83%C2%A9&b=%C3%A9 at ./bug-uri.pl line 12.
Instead of:
http://www.example.com?a=%C3%A9 at ./bug-uri.pl line 10.
http://www.example.com?a=%C3%A9&b=%C3%A9 at ./bug-uri.pl line 12.
Subject: | bug-uri.pl |
#!/usr/bin/perl
# -*- coding: utf-8; -*-
use strict;
use warnings;
use utf8;
use URI;
use URI::QueryParam;
my $uri = URI->new("http://www.example.com");
$uri->query_param_append(a => "é");
warn $uri;
$uri->query_param_append(b => "é");
warn $uri;