scollyer has asked for the wisdom of the Perl Monks concerning the following question:
but it's not clear to me why.$q =~ s/([^$URI::uric])/$URI::Escape::escapes{$1}/go;
#!/usr/bin/perl use LWP; use HTTP::Request::Common; use Encode; use charnames qw(greek); binmode(STDOUT, ":utf8"); my $utf8_data = "<\N{alpha}\N{beta}\N{gamma}\N{delta}>"; print $utf8_data, "\n\n"; print Encode::is_utf8($utf8_data) ? "\$utf8_data marked as UTF-8\n\n" : "\$utf8_data not marked as UTF-8\n\n"; my $request = POST("http://192.168.0.1/test", Content => [ data => $utf8_data, more_data => "some more data", ] ); my $req_string = $request->as_string(); print Encode::is_utf8($req_string) ? "\$req_string marked as UTF-8\n\n" : "\$req_string not marked as UTF-8\n\n"; print $req_string, "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: HTTP::Request::Common::POST and UTF-8
by kwaping (Priest) on Sep 28, 2005 at 15:03 UTC | |
by scollyer (Sexton) on Sep 28, 2005 at 15:32 UTC | |
by ikegami (Patriarch) on Sep 28, 2005 at 16:57 UTC | |
by scollyer (Sexton) on Sep 28, 2005 at 18:48 UTC |