Subject: | Upload file with unicode filename |
$CGI::Simple::PARAM_UTF8 = 1;
$CGI::Simple::DISABLE_UPLOADS = 0;
my $q = CGI::Simple->new();
$q->charset('utf-8');
Now upload file from IE7 and dump $q:
'avatar' => [
"C:\\Documents and Settings\\IETest\\My Documents\\My
Pictures\\\x{410}\x{432}\x{430}\x{442}\x{430}\x{440}\x{44b}\\Rocker Girl
1.gif"
],
'.filehandles' => {
'C:\\Documents and Settings\\IETest\\My Documents\\My
Pictures\\\xd0\x90\xd0\xb2\xd0\xb0\xd1\x82\xd0\xb0\xd1\x80\xd1\x8b\\Rocker
Girl 1.gif' => bless( \*IO::File::_GEN_0, 'IO::File' )
},
'.tmpfiles' => {
'C:\\Documents and Settings\\IETest\\My Documents\\My
Pictures\\\xd0\x90\xd0\xb2\xd0\xb0\xd1\x82\xd0\xb0\xd1\x80\xd1\x8b\\Rocker
Girl 1.gif' => {
'mime' => 'image/gif',
'size' => 4560
}
},
'.upload_fields' => {
'avatar' => 'C:\\Documents and Settings\\IETest\\My Documents\\My
Pictures\\\xd0\x90\xd0\xb2\xd0\xb0\xd1\x82\xd0\xb0\xd1\x80\xd1\x8b\\Rocker
Girl 1.gif'
}
$q->param('avatar') == "C:\\Documents and Settings\\IETest\\My
Documents\\My
Pictures\\\x{410}\x{432}\x{430}\x{442}\x{430}\x{440}\x{44b}\\Rocker Girl
1.gif"
and $q->upload() from this value return undef.