Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 21528 invoked from network); 30 Dec 2009 10:31:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Dec 2009 10:31:00 -0000 Received: (qmail 38913 invoked by uid 500); 30 Dec 2009 10:30:58 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 38781 invoked by uid 500); 30 Dec 2009 10:30:58 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Delivered-To: moderator for dev@commons.apache.org Received: (qmail 99829 invoked by uid 99); 30 Dec 2009 06:36:36 -0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) From: "Raghuveer" To: "'Commons Users List'" , Subject: RE: FileItem.getName() not giving arabic file name which is uploaded Date: Wed, 30 Dec 2009 12:01:47 +0530 Message-ID: <2B86F617351D45F4A20F0038B18FD1DB@pwit.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcqHwFqbvkWDD2GbSSW/EPOPRVvW+wBWJE2g X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 In-Reply-To: <60620BB83000E247BEA8FA6FF19EF38201B19FD6@SG01PVEXCH01.snshub.org> X-TM-AS-Product-Ver: IMSS-7.0.0.3116-6.0.0.1038-17100.003 X-TM-AS-Result: No--11.103-5.0-31-1 X-imss-scan-details: No--11.103-5.0-31-1 X-TM-AS-User-Approved-Sender: No X-TM-AS-Result-Xfilter: Match text exemption rules:No 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 : raghuveerv@infotechsw.com -----Original Message----- From: Arun Kumar S [mailto:arunkumars@crimsonlogic.co.in] Sent: Monday, December 28, 2009 6:49 PM To: dev@commons.apache.org 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: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org