I'm running the code below:
alert('Não é possível realizar essa operação sem a seleção de uma banca.');
But it's popping up like this:
I'm running the code below:
alert('Não é possível realizar essa operação sem a seleção de uma banca.');
But it's popping up like this:
The problem is not the JavaScript encode, but the page encode. Try to use <meta charset="utf-8" />
in your head
section:
<html lang="pt-br">
<head>
<meta charset="utf-8" />
Use this tag shortly after opening head
, even before title
. Depending on the stage of your project and how it was configured, it may be that charset is not utf-8
, but iso-8859-1
Check in your text editor or ide, which is the default coding type for new files, after checking you will see that it should be UTF-8 or iso-8859-1 < (also called Windows-1252 at times). If the file already exists, you can check the encoding through the footer in Notepad ++ .
Use the meta tag for each case:
html5
<meta charset="utf-8" />
html4.x
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
You should use UTF-8 or iso-8859-1
When this occurs:
UTF-8
<meta charset="utf-8">
. Resolve in 90% of cases.