Thursday, March 12, 2009

Visual Studio, the ASP.NET compiler and inconsistent file encoding

I have been using Norwegian as my developer language for a while now, and have gotten used to it. The typical non-English characters work just fine in most Visual Studio project types, but not in ASP.NET.

It seems like the ASP.NET compiler process open my files with a different character encoding than what Visual Studio saved it as.

Opening the offending ASPNET.MVC view in Notepad and saving it as UTF-8 removes the compilation / parser error, however, that’s not a working solution. Who knows when Visual Studio decides to save the file as something different than UTF-8?

International characters are not widely supported on the internet, AFAIK, so I guess I am back to English names or some creative naming to avoid the offending characters.

No comments: