code:

<script> var s = "Русский текст"; console.log(s); </script> 

And in the firebug console, the quackers:

enter image description here

  • The coding of the document is what? - Dmitriy Simushev
  • by default (I don’t know for sure), the script was written without the use of <head> tags and so on - perfect
  • There is a feeling that the contents of the script in cp1251. Try resaving to UTF without BOM and see what happens. - Dmitriy Simushev

1 answer 1

The question is solved by substituting the <meta> :

 <head> <meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /> </head> <body> <script> var s = "Русский текст"; console.log(s); </script> </body> 

Result:

enter image description here