I have a strange situation where Russian characters are outputted as garbage if the template type is JavaScript.

I.e. "Российской Федерации" is outputted correctly if the template is "Web Page", but outputted as "РоÑÑиÑ" if JavaScript is selected.

Any ideas where I might be going wrong?

1 Answer 1


What is going wrong is character encoding. If you have the text Российской Федерации as UTF-8 encoded and this data is then misinterpreted as being windows-1252 encoding, you get Российской Федерации. So apparently the data has been entered correctly, but the software is not interpreting it properly.

  • Yes! What Content-Type is returned in your http headers in both set ups? Try this in terminal to check: curl -I http://expample.com/yourscript.js.
    – AllInOne
    Jan 13, 2014 at 19:57
  • Related: stackoverflow.com/questions/919936/…
    – AllInOne
    Jan 13, 2014 at 19:59
  • "Content-Type: text/javascript" is being returned.
    – Daniel
    Jan 14, 2014 at 16:34
  • Thanks for the reply but doesn't really help me :-) I know EE isn't interpreting it correctly, hence asking the question here.
    – Daniel
    Jan 14, 2014 at 16:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.