Hello. I have a script that automatically updates the block.

<script type="text/javascript"> jQuery(document).ready(function(){ setInterval("jQuery('#timeA').load('# dl#timeB');",5000); }); </script> 

The problem is that after updating the block, the Cyrillic text turns into such garbage.
Encoding pages cp1251 . I'm in js / jQuery / ajax oak-tree. Help please understand ... Or, in principle, you can friend the update script. The main thing is that the script updates the block and loads the information from another file.

  • AddDefaultCharset helped, thanks. - Morty
  • @Morty, If you are given an exhaustive answer, mark it as correct (click on the check mark next to the selected answer). @ Morty; - Zhukov Roman

1 answer 1

I would advise you to give content in utf-8 or compile encodings on the server. There is of course another function ajaxSetup in which you can set the encoding. But still, match the file encodings and standard encodings from htaccess .htaccess AddDefaultCharset WINDOWS-1251

Should help if you have everything in cp1251