i remember having this problem a while ago.
you can try and play with the form html attributes such as 'charset' to see if 
you get the behavior you want.

what i eventually did(and i dont recommend this - it takes time) is hooked 
cos.jar (file upload library from servlets.com) to the faces file upload 
component instead of commons-upload. the API of cos.jar classes allow to pass a 
character encoding to the constructor on the root objects before the actual 
stream parsing begins (commons-upload did not allow that). so i explicitly set 
it to utf-8 and i worked great.
you can maybe go into the commons-upload and see how the algorithms that 
determines the encoding for the multipart/form-data stream works and than you 
can fegure out what to do.


-----Original Message-----
From: Gur Eitan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 22, 2005 10:51 AM
To: MyFaces Discussion; Bruno Aranda
Subject: RE: Uploading file with a name containing non-ascii chars


Hi Bruno,
Thanks a lot for your reply. The thing is I tried it with the example...
I even tried it now again with the name you gave it, and it doesn't succeed.
I also tried it with images other than png, and it fails as well.

Thanks,

Eitan

-----Original Message-----
From: Bruno Aranda [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 22, 2005 8:41 AM
To: MyFaces Discussion
Subject: Re: Uploading file with a name containing non-ascii chars

Eitan, I've tried to reproduce this using the fileUpload example of
the myfaces examples. I've created two image files: testimage.png and
tèstímägê.png, and both files have been uploaded without problems. You
could check what is the difference between your application code and
the examples. To do so, you should download the examples source from
the web site,

Regards,

Bruno


2005/6/21, Gur Eitan <[EMAIL PROTECTED]>:
>  
>  
> 
> Hi 
> 
> I'm trying to use the UploadedFile class to upload files. It works great
> until I try to upload a file with a name containing non-ascii chars (Spanish
> chars for example). 
> 
> I can have 2 copies of the same file - one with only ascii chars in the
> filename, and one with non-ascii chars, but only the ascii named file
> succeeds the upload. 
> 
> Is there a way to solve this? 
> 
> Thanks, 
> 
> Eitan

Reply via email to