I know the jQuery encoding issue has been largely discussed and there's a lot of content about it online, but I have a problem for which I can't find a straightforward solution. Hope you guys can help me out.

I have already dealt properly with the fact that jQuery and AJAX calls only works in UTF-8 - all my POSTs, GETs and stuff from the database are being displayed correctly - but how do I deal when the encoding problem is inside the code?

I have the following jQuery code

$(function() {
$(document).on('click', '.delete_file_link', function(e) {
e.preventDefault();
var link = $(this);
new Messi('Tem certeza que deseja excluir a imagem?.', {modal: true, buttons: [{id: 0, label: 'Sim', val: 'S'}, {id: 1, label: 'Não', val: 'N'}], callback: function(val) { if(val=='S') delete_image(link); }});

return false;
}); // delete
});

My website encoding is, of course, ISO-8859-1, and you can see I have used a portuguese word (Não) in the call to Messi (a jQuery modal library). Even inside the code I get encoding problems? How can I make the code UTF-8 safe?

有帮助吗?

解决方案

Found the problem. It was Minify. If you're having similar issues, check this link https://code.google.com/p/minify/issues/detail?id=106

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top