B�lent, This is a well known issue. The problem is that the use of non-ASCII characters in the content disposition header (the one that includes the file name attribute) violates the MIME spec.
See the following bug reports for details http://nagoya.apache.org/bugzilla/show_bug.cgi?id=30420 http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24504 You can work the problem around by (1) sub-classing FilePart and providing a custom implementation of the sendDispositionHeader(OutputStream) method (2) using Q-Codec to encode the file name http://jakarta.apache.org/commons/codec/apidocs/org/apache/commons/codec/net/QCodec.html Hope this helps Oleg On Wed, 2004-09-15 at 10:40, =?ISO-8859-1?Q?B=FClent_Turhan_\=28B.T.K.B.S.G.\=29?= wrote: > hi, i need some help. How can i change default charset "ISO-8859-1" to "ISO-8859-9" ? > i need this because my file name ( cmEvrakDTO.getFileName() below ) has turkish > chars like I, � ,S � etc .. > and when uploading these chars becomes "?" when reading in servlet side. > > my simple code is : > > > String dokURL = > "http://localhost:9080/AkpostaWeb/UploadByteArrayedFileDuyuru"; > > HttpClient httpClient = new HttpClient(); > > MultipartPostMethod mPost = new MultipartPostMethod(dokURL); > ByteArrayPartSource byteArrayPartSource = > new ByteArrayPartSource( > cmEvrakDTO.getFileName(), > cmEvrakDTO.getFileContent()); > > FilePart fp = new FilePart(cmEvrakDTO.getFileName(), > byteArrayPartSource); > // i wanna change charset here. > mPost.addPart(fp); > try { > //POST > int statusCode = httpClient.executeMethod(mPost); > } catch (HttpException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } catch (IOException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } > > mPost.releaseConnection(); > > > thx a lot.. > > B�lent > > > > > > > > > > > > > > > > > > > > > > > ************************************************************************************* > 01.09.2004 tarihinden itibaren @akbank.com.tr seklindeki e-posta mesajlari > sistemimize ulasmayacaktir. Iletisimin aksamamasi i�in kullandiginiz e mail > adreslerini [EMAIL PROTECTED] seklinde degistirmenizi rica ederiz. > > Bu e-posta ve muhtemel eklerinde verilen bilgiler kisiye �zel ve gizli olup, > yalnizca mesajda belirlenen alici ile ilgilidir.Size yanlislikla ulasmissa l�tfen > g�ndericiye bilgi veriniz, mesaji siliniz ve i�erigini baska bir kisiye > a�iklamayiniz, herhangi bir ortama kopyalamayiniz. Bu mesaj aksi s�zlesme ile > belirtilmedik�e herhangi bir finansal islem teklifi, alimi, satimi veya herhangi bir > havalenin teyidi gibi bankacilik islemi yapilmasi amacini tasimamaktadir.Verilen t�m > bilgilerin dogrulugu ve b�t�nl�g�n�n garantisi verilmemekte olup, �nceden > bildirilmeksizin degistirilebilecektir.Bu mesajin i�erigi Bankamizin resmi > g�r�slerini yansitmayabileceginden Akbank T.A.S. hi�bir hukuki sorumlulugu kabul > etmez. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
