I'm using the premium version of JFileUpload and I'm trying to upload files with Chinese filenames (like 中文字符.txt). Although I've set the "encoding" PARAM to "UTF-8", the filename doesn't have the proper encoding when reaching the server. Also, the Chinese characters are not displayed properly in the upload log or the console log:
Uploading: ????.txt
[INFO] HTTPUploadTransfer - Upload (POST) started : C:\Users\x\Desktop\????\????.txt
Is Chinese included in the multilanguage support feature?
Thanks!
Uploading Chinese filenames [Solved]Uploading Chinese filenames [Solved]
Last edited by vlad on Thu Jan 15, 2009 1:45 pm, edited 1 time in total.
Re: Uploading Chinese filenamesChinese support should work as all others non-ascii languages. First make sure that the applet is able to display Chinese characters. To do so enable "resources" parameter such as:
<PARAM NAME="resources" VALUE="i18n"> And setup some Chinese words in i18n.properties (this file is under documentation/tutorials folder). All non-ascii values must be encoded in Unicode. See FAQ to convert your Chinese translated i18n.properties in Unicode: http://www.jfileupload.com/products/jfi ... aq.html#19 If native2ascii program doesn't work for you then you can use the online Unicode helper: http://unicode.org/cldr/utility/character.jsp?a=5B57 (5B57 is the Unicode for 字) For instance, the first line of i18n.properties: taskoutput.usage=Select or drag and drop file to upload Would become: taskoutput.usage=Select \u5B57 ... Does it display the Chinese character in UI ? Re: Uploading Chinese filenamesAlthough I have this parameter enabled, and I put "taskoutput.usage=Select \u5B57 ..." inside the "i18n.properties" file, the applet is not showing the Chinese character but an square sign. This was a server-side problem. I now get the Chinese filenames properly. Re: Uploading Chinese filenamesI've just made a test and it displays the Chinese char. Which JRE version are you using ?
Re: Uploading Chinese filenamesI'm using Java version: 1.6.0_07
So I have this text: "Drag files from your computer here \u5B57 \u4E2D" which displays like this: Re: Uploading Chinese filenamesI did exactly the same and I have the following (see screenshot):
I'm wondering if you have a multi-languages JRE, could you try do install the latest one 1.6.0_11:http://java.sun.com/javase/downloads/index.jsp Or you could have a problem with the fonts in your JRE. Could you check you're able to see another applet with Chinese characters ? Re: Uploading Chinese filenamesIt was a fonts issue. Thank you for your help!
Re: Uploading Chinese filenames [Solved]hi i am having the same issue with jFileUpload control..
I can upload the other files excepting having a chinese name..! Please help me what should i do..? |