By default servers use ISO-8859-1 charset.Convert the value to UTF-8 and
use.
String fieldName = item.getFieldName();
String strValue = item.getString();
String strValueActual=new String(strValue.getBytes("ISO-8859-1"), "UTF-8");
Regards,
Raghuveer Vellanki
Email : [email protected]
-----Original Message-----
From: Arun Kumar S [mailto:[email protected]]
Sent: Monday, December 28, 2009 6:49 PM
To: [email protected]
Subject: FileItem.getName() not giving arabic file name which is uploaded
Hi All,
I am using commons-cileUpload1.2.jar.
FileItem.getName() not giving arabic file name which is uploaded.
I am using the following code to get the file name.
Iterator iter = fileItems.iterator();
while (iter.hasNext()) {
FileItem item = (FileItem) iter.next();
if(!item.isFormField()){
String fieldName = item.getFieldName();
String fileName = item.getName();
}
}
For English it is working fine. For arabic I am getting junk character like,
E:\???.txt.
Is there any encoding support api which is give arabic file name?
Please help on the same.
Thanks & Regards.
ARUN KUMAR S
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]