1

Closed

Unicode - Codepage 1200 characters gets transformed incorrectly

description

I have a file and in VS when I look at the Advanced Save Options it reports the file encoding as "Unicode Codepage 1200".

This file has a string literal with, say, the inverted exclamation mark U+00A1 in it. If I look at the binary representation it is actually 0x00A100 however. When I look in the generated javascript file it has been transformed to be 0xEFBFBD strangely. And actually I have a whole bunch of characters in my file that all get transformed into this same value.

For example:
¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ­ ® ¯
° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ × ÷
À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï
Ð Ñ Ò Ó Ô Õ Ö Ø Ù Ú Û Ü Ý Þ ß
à á â ã ä å æ ç è é ê ë ì í î ï
ð ñ ò ó ô õ ö ø ù ú û ü ý þ ÿ

All of these characters are coming out wrong in the generated javascript for this encoding.
Closed Nov 14, 2012 at 12:29 AM by RyanCavanaugh
Thanks for the follow-up - now that we're preserving the UTF-8 marker, everything should work fine

comments

justinc wrote Nov 13, 2012 at 5:17 PM

While this is still true, I think the issue was just that I had this encoding set at all. I inherited the file from somewhere else and I assumed it was ok but just changing it to utf-8 fixed the issue for me. I think you can just close this, just changing the encoding to utf-8 seems like the right way to go.