When user clicked on the file named hyperlink ( which is now displaying in the chinese characterd file name in web page).
That file name need to passed to a method, which has to fetch the file and give the user to download.
When i try to pass chinese (non-english characterd) string as a file name to a Java method. It is not working..
How to pass non-english string values to a java method..
I tried several ways likes:
filenamepassed = URLEncoder.encode(filenamepassed, "UTF-8");
String decodedfilename= URLDecoder.decode(filenamepassed);
I am unable to solve the issue.
Thanks in advance for helping in this regard.
Pinned topic how to pass chinese charatered string in a Java Method
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-02-16T05:10:23Z at 2012-02-16T05:10:23Z by SystemAdmin
SystemAdmin 110000D4XK4447 Posts
Re: how to pass chinese charatered string in a Java Method2012-02-16T05:10:23ZThis is the accepted answer. This is the accepted answer.Maybe you can try to use the BASE64 encoder.
For example, encode the chinese word like this .%E5%93%88%E5%93%88
Many chinese website use base64 encode the chinese word.
Maybe it will help. :)