D
D
DeusModus2012-04-06 12:00:35
JavaScript
DeusModus, 2012-04-06 12:00:35

IE9+VK APP=incorrect encoding when pasting text from a script

Hey Habr.

I rarely ask questions, but if I do, I do.
There is a simple iframe application written for partners.
If you click on the 'Get Discount' button in IE9, you will see that the text encoding is crap. Only in IE.
The whole project is in UTF-8 (even css).
Why is that?

The text that is written there is returned something like this:

function getWindowDiscountTemplate() {
    var message = 'От Вас потребуется разместить стильный баннер на своей стене, '+
        'прорекламировав нашу марку. Размещение баннера происходит автоматически '+
        'на следующем шаге, но с предварительным согласием с Вашей стороны.';

    return message;
}

I did not begin to fasten templating engines and simply rendered the text into functions in separate files.

Maybe the problem is in the messageBox component that comes with VK?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Oleg Matrozov, 2012-04-06
@Mear

Have you tried explicitly specifying the encoding in the server response headers? I just see that your main html is leaving the server with the specified content-type indicating the encoding, but js is not. Maybe IE9 takes the win-1251 default encoding?.. unlike other browsers.

M
moscow_beast, 2012-04-06
@moscow_beast

Maybe so:

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question