Hi All-
      We are using Apache::Request to handle our uploads 
via the browser. Now that we switched to UTF-8 encoding 
any filename with Kanji in the filename uploads with a 
size of '0' and nothing goes to disk. Take the same file, 
put its name to roman chars and it uploads fine. All other 
file fields handle Kanji inputs without any problems, only 
TYPE=FILE bomb under Apache::Request.

     Has anyone else seen a problem with Apache::Request 
and kanji character filenames?

     #
     # Read and Encode the uploaded document
     #
     my $upload = $r->upload() ;
     my $fh = $upload->fh() ;
     my $info = $upload->info;
     my $size = $upload->size;
     $Title = $upload->filename ;
     print STDERR "Size is $size\n" if $debug ;
     if( $debug ) {
            while (my($key, $val) = each %$info) {
                print STDERR "UPL:$key=$val\n" ;
            }
     }

     while( $buf = <$fh> ) {
         $TEMP .= $buf ;
     }

With Kanji filename :
Size is 0
UPL:Content-Disposition=form-data; name="UPLOADFILE"; 
filename="????????.DOC"
UPL:Content-Type=application/octet-stream


Without Kanji filename
Size is 306688
UPL:Content-Disposition=form-data; name="UPLOADFILE"; 
filename="copy.DOC"
UPL:Content-Type=application/msword

Any thoughts or input would be great.

John-

Reply via email to