I am changing an existing page encoded using ISO-8859-1, and I cannot change its encoding to UTF-8.
I am using jQuery UI Dialog to send information to the user.
Everything is fine, except for the fact that some buttons have accented characters below:
buttons: [ { text: "SIM!", click: function() { //'yes' button clicked } }, { text:'NÃO', click: function() { //'no' button clicked } } ]
When I show the dialog, the "NÃO" button becomes "N & Atilde; O", but the browser ignores the html object and displays N & Atilde; O.
I also tried putting N & Atilde; O instead of NÃO, but did not work.
Is there a way to correctly display the accented character on the jQuery UI button?
UPDATE
After struggling with this problem all morning I saw what was happening ... CMS only exchanges javascript texts for HTML objects (this is the worst CMS I have ever seen). I solved the problem of creating a hidden div with the text that I wanted to put on the button and used it, instead of just placing the line as shown below:
front:
buttons: [ { text: "SIM!", click: function() { //'yes' button clicked } }, { text:'NÃO', click: function() { //'no' button clicked } } ]
after
buttons: [ { text: "SIM!", click: function() { //'yes' button clicked } }, { text:$("#badcms").html(), click: function() { //'no' button clicked } } ] </script> (...) <div id="badcms" style="display:none">NÃO</div>