如何解决在Mac OS上使用Firefox和Chrome的重音字母
我有这个问题: 我有这个标签用于上传文件
<div id="form-attachments">
<input type="file" name="attachFile" id="attachFile"/>
</div>
我就这样恢复了价值
$("#attachFile").change(function () {
var file = document.getElementById('attachFile').files[0];
uploadFile(file);
});
function uploadFile(file) {
var formData = new FormData();
formData.append('file',file);
formData.append('IDNotifica',$('#IDNotifica').val());
formData.append('relata',$('#fileTipoRelata').val());
var filename = $('input[type=file]').val().split('\\').pop();
//var bool = checkNome(filename);
//if (!bool)
// return false;
$("#loadingFile").fadeIn();
$.ajax({
url: $('#PathAggiungiAllegati').val(),//Server script to process data
type: 'POST',//contentType: "application/json; charset=iso-8859-1",xhr: function () { // Custom XMLHttpRequest
var myXhr = $.ajaxSettings.xhr();
if (myXhr.upload) { // Check if upload property exists
myXhr.upload.addEventListener('progress',progressHandlingFunction,false); // For handling the progress of the upload
}
return myXhr;
},//Ajax events
beforeSend: beforeSendHandler,success: completeHandler,error: errorHandler,// Form data
data: formData,//Options to tell jQuery not to process data or worry about content-type.
cache: false,contentType: false,processData: false,//beforeSend: function (jqXHR) {
// jqXHR.overrideMimeType('application/json;charset=iso-8859-1');
//}
});
}
Windows可以,但是在MAC OS中,当上传的文件的值到达服务器时,我有一个检查控件,用于阻止带有特殊字符(也包含字母)的文件,但是此检查不会检测到来自Mac客户端。
我尝试了更多方法(转换为utf8,更改字符集,在客户端ecc处插入检查控件。)但是我认为问题出在标签
中
(此问题仅在Firefox和Chrome上存在,在Safari中可以)
<div id="form-attachments">
<input type="file" name="attachFile" id="attachFile"/>
</div>`
你能帮我吗?
解决方法
一切都在Stackoverflow帖子中进行了精确描述:
通常,该网站无法在Firefox中正确显示,而在Chrome中可以:
Strange font encoding in all browsers
实际结果:
字体显示不正确。
预期结果:
字体应该正确呈现。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。