0

This project is properly displaying characteres using ISO-8859-1 (main page) on server and a Javascript UTF-8, however this function on server displays the string ("Observações") properly configured using UTF-8, however when I try to execute it locally it displays Observações as Observações.

My main page is set to ISO-8859-1:

<META content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">

and it calls the script like this:

<SCRIPT type="text/javascript" charset="UTF-8" src="js/functions.js"></SCRIPT>

what I don't understand is why it works on server but not on my computer and how to fix it.

Thank you very much.

Zee
  • 8,420
  • 5
  • 36
  • 58
migmig
  • 131
  • 3
  • 6
  • 16
  • What if you set the main page's encoding to utf-8? – icedtrees Apr 27 '15 at 12:29
  • Please have a look at the duplicate, I'm pretty sure that's the same issue. If it isn't, please update your question with any new insights regarding HTTP headers. – deceze Apr 27 '15 at 12:29
  • If I set, the whole page displays triangles instead of special characters. And when using ISO-5589-1 it displays properly, but not the string inside javascript – migmig Apr 27 '15 at 12:31
  • Please be specific and update your question. "Set" what exactly where? What encoding is your JS file saved as to begin with? – deceze Apr 27 '15 at 12:42
  • When I say 'set' I mean the charset is set to `ISO-5589-1`. And my JS file is saved as `UTF-8 w/o BOM` – migmig Apr 27 '15 at 12:45
  • Seems like the file was corrupted somehow, after creating a new one and setting the enconding of the new JS file to UTF-8 it worked! – migmig Apr 27 '15 at 14:18

0 Answers0