Answer the question
In order to leave comments, you need to log in
Apache giving away JS in CP1251?
For unknown reasons, Apache serves all files except JS in UTF-8, and JS in CP1251.
This is written in .htaccess:
AddDefaultCharset utf-8
AddCharset utf-8 .css .js
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,L]
Answer the question
In order to leave comments, you need to log in
Try adding encoding as header (mod_headers needs to be enabled):
<ifModule mod_headers.c>
Header set Content-Type application/javascript; charset=utf-8
</ifModule>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question