You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Volker Weber <co...@weber-oldenburg.de> on 2007/07/23 12:39:57 UTC

[fileupload] encoding of filename

Hi all,

i have a problem with the encoding of the filename.

to get the correct characters (e.g. german umlauts) i need to recode the
filename:

  String encoding = request.getCharacterEncoding();
  String fileName = new String(item.getName().getBytes(), encoding);

note: in my app the encoding is always utf-8.

the file content is correct encoded without any recoding.

This workarround works in version 1.0, not in 1.1 but in 1.2 again.
In version 1.1 i can't find a way to get the correct encoding.

is there a bug in fileupload or do i miss something?



Regards,
  Volker

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [fileupload] encoding of filename

Posted by Volker Weber <co...@weber-oldenburg.de>.
Hi,

reposting again after nearly 3 month  without response.

No one out there with knowledge on fileupload and encoding?



Regards,
  Volker


Volker Weber wrote:
> Hi all,
> 
> i have a problem with the encoding of the filename.
> 
> to get the correct characters (e.g. german umlauts) i need to recode the
> filename:
> 
>   String encoding = request.getCharacterEncoding();
>   String fileName = new String(item.getName().getBytes(), encoding);
> 
> note: in my app the encoding is always utf-8.
> 
> the file content is correct encoded without any recoding.
> 
> This workarround works in version 1.0, not in 1.1 but in 1.2 again.
> In version 1.1 i can't find a way to get the correct encoding.
> 
> is there a bug in fileupload or do i miss something?
> 
> 
> 
> Regards,
>   Volker
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [fileupload] encoding of filename

Posted by Volker Weber <co...@weber-oldenburg.de>.
Hi,

reposting after a week without response.

No one out there with knowledge on fileupload and encoding?



Regards,
  Volker


Volker Weber wrote:
> Hi all,
> 
> i have a problem with the encoding of the filename.
> 
> to get the correct characters (e.g. german umlauts) i need to recode the
> filename:
> 
>   String encoding = request.getCharacterEncoding();
>   String fileName = new String(item.getName().getBytes(), encoding);
> 
> note: in my app the encoding is always utf-8.
> 
> the file content is correct encoded without any recoding.
> 
> This workarround works in version 1.0, not in 1.1 but in 1.2 again.
> In version 1.1 i can't find a way to get the correct encoding.
> 
> is there a bug in fileupload or do i miss something?
> 
> 
> 
> Regards,
>   Volker
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org