简体   繁体   中英

Problem with special characters when Minifying JS

I'm using MVC ScriptManager to Compress and concatenate all my .js files. It works very well, except that if a *.js has a special character such as "á, à" it turns to "Ã!".

I'm trying to change the source code but with no success so far.

Does anyone have an idea what this could be?

Thanks!!

You can write them like . Here you can look up the special characters: http://www.fileformat.info/info/unicode/char/search.htm

It looks like the source file encoding is ANSI, and the output is encoded as UTF-8.

In VS use the Advanced Save Options from the File menu to save the original .js file as UTF-8 with a signature (code page 65001).

I make a point of saving all text-type files (.cs, .js, .css, etc.) as UTF-8 to avoid any of these issues later on.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM