lib:
FileUpload 1.0 - 24 Jun 2003
src:
FileUploadBase fu = new DiskFileUpload();
List fileItems = null;
try
{
fileItems = fu.parseRequest(request);
Iterator iter = fileItems.iterator();
FileItem fileitem = null;
while(iter.hasNext())
{
// here, item is not a file item, just a simple form field
FileItem item = (FileItem) iter.next();
String itemname = item.getString();
}
}
client: os(windowsXP sp1),encoding(gbk) browser(IE6.0)
server: os(windowsXP sp1), encoding(gbk) tomcat4.1.30
The result is correct.
client: os(windowsXP sp1),encoding(gbk) browser(IE6.0)
server: os(linux redhat7.3), encoding(ISO8859-15) tomcat4.1.30
itemname is not the correct string.
I use fu.setEncoding("ISO8859-15"), itemname is still not correct,
then i think maybe the encoding should be the same as the client's,
so i use fu.setEncoding("gbk"), itemname is still not correct.