commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Priest <>
Subject [fileupload] FileItem.getFieldName() does not follow specified en coding?
Date Thu, 29 Jan 2004 19:53:18 GMT

I am using DiskFileUpload and the DefaultFileItem classes.

I am setting the Header Encoding (in my jsp page) as so:

    // Create a new file upload handler
    DiskFileUpload upload = new DiskFileUpload();

    //set the encoding to UTF-8

I am attempting to upload a file with Chinese characters in the name.

But when I do a FileItem.getFieldName(), I am coming up with ???? for the
file name.

However, FileItem.getName() seems to be correctly encoded?

Can anyone tell me what I could be missing when I perform a

I know that you can get the contents of a item by specifying
FileItem.getString("UTF-8"), and that will decode correctly. However, there
is no such call for getFieldName().

Thanks in advance.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message