XUpload - utf8 problem

Message
Author
xuxu
Posts: 2
Joined: Mar 07, 2008 4:18 pm

utf8 problem

#1 Postby xuxu » Mar 09, 2008 5:55 am

Hi,

all the files I've got on my web server are encoded in UTF-8.
I tried to upload a file named "&é'(-è_çà).jpg" and I get a file named "&é'(-è_çà )..jpg".

How can I fix that probleme please ?

I've got Xupload pro 2.4.

Best regards.

ahpang
Posts: 2
Joined: Feb 17, 2009 2:52 am

#2 Postby ahpang » Feb 17, 2009 6:56 am

Hi,

I have the problem too, I try to upload files with UTF-8 characters or special characters like "abc#^_#^.txt"

for UTF-8 charcters file, all become monster file name like xuxu one

Anyone can help???

User avatar
PilgrimX182
Posts: 2186
Joined: Mar 22, 2006 1:39 pm

#3 Postby PilgrimX182 » Feb 18, 2009 8:44 am

I believe problem may be that your filesytem does not support UTF-8.

ahpang
Posts: 2
Joined: Feb 17, 2009 2:52 am

#4 Postby ahpang » Feb 18, 2009 5:25 pm

Hi,

Maybe let me provide more information to your for a check,

for the upload form, I have already added accept-charset="UTF-8" in <form>, and the html encoding is UTF-8.

I have tried to use another upload script "uber-uploader" in the same server before, all "UTF-8" files can upload without any character display problem, so I think there has some problem on the xupload, rather than the server filesystem problem.

And I found the most strange point is, if I input some "UTF-8" characters in the file description field, and upload, the "UTF-8" file name can retrieve in post.php without problem, but if I let the description field to empty, the "UTF-8" file name will can't display properly in post.php.

User avatar
PilgrimX182
Posts: 2186
Joined: Mar 22, 2006 1:39 pm

#5 Postby PilgrimX182 » Feb 19, 2009 8:09 am

Clear thing out: you have problems with utf-8 with saved files on disk OR with POST data sent to url_post?

Here goes solution for url_post data:
in upload.cgi replace this code

Code: Select all

print"Content-type: text/html\n\n";
print"<HTML><BODY><Form name='F1' action='$url_post' target='_parent' method='POST'>";
with

Code: Select all

print"Content-type: text/html; charset=UTF-8\n\n";
print qq{<HTML><HEAD><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD><BODY><Form name='F1' action='$url_post' target='_parent' method='POST'>};