2
I have the following code:
$(function(){
var curso = controller.getNomeCurso();
$("#curso").text(curso);
});
The problem is in line 18, because I cannot display values with special characters correctly.
Example: When sending Nutrição
, the displayed value is Nutri%C3%A7%C3%A3o
, right in the line 4 existing a meta tag defining the charset as UTF-8
.
How can I fix this?
Thanks for the help, but unfortunately it didn’t work.
– Jedaias Rodrigues
No coding problem, special characters are encoded and not corrupted.
– Marcus Vinicius
Add charset to your external js: <script type="text/javascript" src="*. js" charset="utf-8"></script>
– bp002
Also try changing the charset property to iso-8859-1
– bp002
Thank you very much for the help, but unfortunately none of the options worked. I also did not intend to get the hint to put the charset to my external js.
– Jedaias Rodrigues
is to add the charset="utf-8" or charset="iso-8859-1" property to your external js link, so when the page prompts js, it would recognize the encoding.
– bp002
Guy opened on IE and it was normally, but on Chrome I came across the coding problem, I’ll be one thing and let you know if I’m positive.
– bp002