Re: UTF8 character issue with Apache::Request?

2002-09-30 Thread siberian

Confirmed, but its browser dependant.

IE on Mac OS X sends the file but munges the filename. So 
they file arrives fine but with the wrong name.

Mozilla on Mac OS X doesnt even send the file.

Still waiting for results with windows systems buth Eng 
and J.

John-

On 28 Sep 2002 23:02:59 -0400
  Joe Schaefer [EMAIL PROTECTED] wrote:
Peter Bi [EMAIL PROTECTED] writes:

 Please take a serious look. 

I did, and I suspect this problem is caused by OP's 
client/browser 
failing to open the file with the Kanji filename, so it 
might be
sending an empty file with the default enctype instead.

 There were several related reports in the mailing list 
during the
 months: Apache::Request might not handle double-bytes or 
utf8
 correctly. Or it may be due to the C library.

You seem to know something about this issue.  However, 
this is the first 
time I've seen utf8 discussed in relation to 
Apache::Request on this list.
I've tried a few dozen links from google (utf8 
Apache::Request), and 
I've searched the epigone archives for this list.  I 
wasn't able to find 
a single related report.

A reference url, a test case, or a better still, a patch, 
would be 
considerably more helpful than sending me on a wild goose 
chase.

-- 
Joe Schaefer




Re: UTF8 character issue with Apache::Request?

2002-09-28 Thread Joe Schaefer

[EMAIL PROTECTED] writes:

[...]

 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.

Are you certain this is a server-side problem?  The 
varying Content-Types look suspicious to me.  I'd double-check
(via tcpdump or something) that the client is actually sending 
the whole file to the server.

-- 
Joe Schaefer



Re: UTF8 character issue with Apache::Request?

2002-09-28 Thread Peter Bi

Please take a serious look. There were several related reports in the
mailing list during the months: Apache::Request might not handle
double-bytes or utf8 correctly. Or it may be due to the C library.

Peter

- Original Message -
From: Joe Schaefer [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; modperl list [EMAIL PROTECTED]
Sent: Saturday, September 28, 2002 10:08 AM
Subject: Re: UTF8 character issue with Apache::Request?


 [EMAIL PROTECTED] writes:

 [...]

  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.

 Are you certain this is a server-side problem?  The
 varying Content-Types look suspicious to me.  I'd double-check
 (via tcpdump or something) that the client is actually sending
 the whole file to the server.

 --
 Joe Schaefer





Re: UTF8 character issue with Apache::Request?

2002-09-28 Thread Joe Schaefer

Peter Bi [EMAIL PROTECTED] writes:

 Please take a serious look. 

I did, and I suspect this problem is caused by OP's client/browser 
failing to open the file with the Kanji filename, so it might be
sending an empty file with the default enctype instead.

 There were several related reports in the mailing list during the
 months: Apache::Request might not handle double-bytes or utf8
 correctly. Or it may be due to the C library.

You seem to know something about this issue.  However, this is the first 
time I've seen utf8 discussed in relation to Apache::Request on this list.
I've tried a few dozen links from google (utf8 Apache::Request), and 
I've searched the epigone archives for this list.  I wasn't able to find 
a single related report.

A reference url, a test case, or a better still, a patch, would be 
considerably more helpful than sending me on a wild goose chase.

-- 
Joe Schaefer



UTF8 character issue with Apache::Request?

2002-09-27 Thread siberian

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-