fine-uploader 3.1 jquery-Version工作正常,直到文件名以德语特殊字符(äöü)开头。我认为这与浏览器和操作系统无关。 HTML和PHP设置为UTF-8。
上传名为“äöütest.txt”的文件我在[Server] / tmp上获得“test.txt”。名为“Xäöütext.txt”的文件将被正确传输。
我该如何解决这个问题?
我认为在客户端没有什么奇怪的。也许我错了:
$('#dlgVorgangNewUpload').fineUploader({
request: { endpoint: '././Objekt.ajax.php' },
button: null,
text: { uploadButton: txt,
cancelButton: 'Abbruch',
failUpload: "Upload fehlgeschlagen"
},
multiple: true,
retry: { showButton: false },
validation: {sizeLimit: 10485760 }, // 10 x 1024 x 1024
debug: true
}).on('submit', function(event, id, filename) {
UploadCounter++;
$(this).fineUploader('setParams', {'todo': 'VorgangUpload'});
}).on('complete', function(event, id, fileName, responseJSON ){
UploadCounter--;
if (responseJSON.success) {
if (UploadCounter == 0) BusyShow("importiere Dateien....");
$.ajax({
// some stuff to store file-inbformation in Database
...
});
} else if (responseJSON['error']){
msgbox (responseJSON['error'],"Fehler:");
}
}).on('cancel', function(event, id, filename) {
UploadCounter--;
});
这是Firebug的输出:
Parameter:
qqfile äöüß test.doc
todo VorgangUpload
Header:
POST /incl/Objekt.ajax.php?todo=VorgangUpload&qqfile=%C3%A4%C3%B6%C3%BC%C3%9F+test.doc HTTP/1.1
Host: xxxxx.xxxxxxxxxxxx.de
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:27.0) Gecko/20100101 Firefox/27.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: de-de
Accept-Encoding: gzip, deflate
X-Requested-With: XMLHttpRequest
X-File-Name: %C3%A4%C3%B6%C3%BC%C3%9F%20test.doc
Cache-Control: no-cache
Content-Type: application/octet-stream
X-Mime-Type: application/msword
Referer: https://xxxxxxxxxx.xxxxxxxxx.de/incl/Objekt.php?id=4190
Content-Length: 12800
Cookie: .....
PHPSESSID=.....
Connection: keep-alive
Pragma: no-cache
嗯。
壳牌中的:
file -i Objekt.ajax.php
Objekt.ajax.php: text/x-php; charset=utf-8
echo $LANG
de_DE
的PHP文件:
...
header('content-type: text/html; charset=utf-8');
...
我还应该怎么办?我不明白为什么这应该是服务器问题。使用特殊字符传输带有特殊字符的文件精细,直到文件启动并带有特殊字符。这对我来说很奇怪。