0

I got one problem in my struts2 application.I wrote download program using struts2 tag.My program is ok when download file name wrote english language.(eg. sample.xls).But I changed my file name to other language.(eg.画面定義書.xls)then my file name doesn't display well.See this

enter image description here I used <%@ page contentType="text/html;charset=UTF-8"%> in every my jsp page.So how to solve this problem?Please share me some ideas.My environment is Windows7, eclipse juno, tomcat7.

Sai Ye Yan Naing Aye
  • 6,622
  • 12
  • 47
  • 65
  • Can you give me this program it will very helpful for me . thanks – Manoj Gupta Apr 28 '14 at 07:24
  • my mail id is manojgupta1902@hotmail.com – Manoj Gupta Apr 28 '14 at 07:33
  • @ManojGupta I'm sorry for this. This project is confidential project of my work. But you can see this answer at http://stackoverflow.com/questions/22319277/how-to-set-chinese-filename-correctly-for-different-browsers-when-download-file?noredirect=1#comment33923524_22319277 – Sai Ye Yan Naing Aye Apr 30 '14 at 11:07

2 Answers2

0

The encoding of the dialog box doesn't depend on the content type of your jsp page. The character encoding of your windows pop up dialog box needs to be changed to desired encoding format (setting a new encoding value in registries or some other way )

Alok
  • 301
  • 1
  • 6
0

The dialog invoked by the browser is using the system's Locale;
you need then to set the right Locale, so that the system can obtain the data needed to draw the new characters.

Since you are using Windows 7:

enter image description here

then

enter image description here

and finally

enter image description here

The pictures (along with the instructions for XP and Vista) are taken from here.

At this point, you should be able to re-set the Locale to the original value, and correctly see the japanese characters thanks to the Language Pack installed on the system during the previous operation.

Andrea Ligios
  • 49,480
  • 26
  • 114
  • 243