views:

67

answers:

2

Hi!

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!!

+2  A: 

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

Philipe Fatio
It worked, but I don't feel comfortable in writing this way... but, thanks for your help. I'll give another look at project sourcecode
AndreMiranda
A: 

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.

devstuff