VS2005 : how do you set DEFAULT encoding of cs files to UTF-8 ?

  • Thread starter Michel de Becdelièvre
  • Start date
M

Michel de Becdelièvre

I'm developing a ASP.Net 2.0 Web site, all my pages are in UTF-8, BUT
when I add a new aspx page, the aspx file is created in UTF-8, but the
aspx.cs file is created as Western...1252. It is annoying to have to go to
the Advanced save Options dialogs for EACH .cs file (and accented characters
coming from compiled .cs saved as 1252 do not show correctly).

Any way to change the default .cs file creation option ?

NB : I know that "international" characters can end up in resx files, but
I'd like to avoid it in a number of places (UTF-8 math or symbols characters
DO NOT need to be translated for instance).

thanks in advance.
 
J

Joerg Jooss

Thus wrote Michel,
I'm developing a ASP.Net 2.0 Web site, all my pages are in UTF-8,
BUT when I add a new aspx page, the aspx file is created in UTF-8, but
the aspx.cs file is created as Western...1252. It is annoying to have
to go to the Advanced save Options dialogs for EACH .cs file (and
accented characters coming from compiled .cs saved as 1252 do not show
correctly).

Any way to change the default .cs file creation option ?

Weird -- I'm just working on a blog entry on that subject. What I've found
is that the only case in which VS2005 does *not* use UTF-8 as default encoding
for source files is when using pages with inline code.

Hm...
 
M

Michel de Becdelièvre

Joerg Jooss said:
Thus wrote Michel,


Weird -- I'm just working on a blog entry on that subject. What I've found
is that the only case in which VS2005 does *not* use UTF-8 as default
encoding for source files is when using pages with inline code.

Hm...

Not my case, I dislike inline code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top