Source encoding in Visual Web Developer 2008 Express

Where can I install it? I need the files to be UTF-8 encoded by default ... there is nothing in Tools -> Options or any other menu as far as I know :(

PS I don't need to set the default encoding for Project or so, I need it to be the default for any files that I create. Thanks for the help:)

+1


source to share


7 replies


File -> Advanced Save Options

Select Encoding and Line Endings



Regards, Haris

+1


source


Instead of clicking, click Save As. Then hit the little down arrow to save it with encoding. Once that is done, you will be taken to the advanced save options that appear in full VS studio. Then you can choose UTF-8 as the encoding.



+2


source


Encoding options are available from the drop-down list attached to the Save button when you select Save As.

+2


source


I believe that source encoding cannot be set as a project setting. Instead, it tries to determine the source encoding from the file using a rather limited algorithm. Part of this algorithm

  • if it is UTF-8 signed (BOM), it is UTF-8 encoded
  • otherwise it is in ANSI code page (CP_ACP)

There might be some additional checks in between (like checking UTF-16 with a BOM).

In my experience, "save as" encoding is not very useful unless saved as UTF-8-with-BOM. You can save it in a different encoding, but it will still count as CP_ACP when reopening it.

+1


source


IIRC, source files in visual studio are already encoded as UTF-8.

However, if I'm wrong, or just want to force any particular encoding, you can do so by selecting the option Save As...

for file and checking the pull options under the save button.

0


source


Thanks for your answers, but this is not exactly what I need.

Okay, I'll try to be more specific. This is how it goes: I go to the Open site, I open the site directly via FTP. On the right side, I see a list of files. I right click on it, select new element, html file, I have a new html file. I add text to it, press save (CTRL + S), the file will be saved. Now I open it through a browser and I see that it is not being saved in UTF-8. So, can I fix this problem anyway? :)

0


source


Are you saying that although the original file is utf-8 encoded, your internet browser displays it as ansi? do you have a specific metacoding tag?

http://tlt.its.psu.edu/suggestions/international/web/tips/declare.html

try this and your browser should say it's utf-8. just saving the file in utf-8 won't.

0


source







All Articles