Same problem as a previous question I asked but specifically for IE, since the answer I gave works in everything except IE. So this question is specifically for IE:
How can I set the charset to be used when reading a javascript file via a script
element in IE?
I have a JSON file with a ™
character in it and when I include the file on to my HTML page with <script charset="Cp1252" ...
(which works in every other browser) on IE, then I get the following character �
.
Internet Explorer requires that the value for
charset
isWindows-1252
.This should be a more universally compatible value for the
charset
attribute - HTML5 defines that the value should be a case-insensitive match of a name or alias in the IANA Character Sets Registry:I know that Firefox supports this value too, as a synonym for CP1252, the specification suggests that other browsers should too.