Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do I check the encoding of a file in visual studio 2010?

How can I check whether a file is encoded in UTF-8, ANSI, etc... in visual studio 2010?

like image 613
Saturn K Avatar asked Aug 05 '10 16:08

Saturn K


People also ask

How do I check encoding in Visual Studio?

In the Open With dialog box, choose the editor to open the file with. Many Visual Studio editors, such as the forms editor, will auto-detect the encoding and open the file appropriately. If you choose an editor that allows you to choose an encoding, the Encoding dialog box is displayed.

How do I know the encoding of a file?

Open up your file using regular old vanilla Notepad that comes with Windows. It will show you the encoding of the file when you click "Save As...". Whatever the default-selected encoding is, that is what your current encoding is for the file.

What encoding does Visual Studio use?

Visual Studio default encoding format is UTF-8, but it has built-in encoding formats for various languages, which can be selected according to your needs. Generally, UTF-8 can be kept, because programs are usually written in English, so compatibility is better.

How do I change the encoding code in Visual Studio?

In the bottom bar of VS Code, you'll see the label UTF-8. Click it to open the action bar and select Save with encoding. You can now pick a new encoding for that file.


2 Answers

Found out that if you go to "File" and then click on "Advance Saved Option" it displays the currently opened file's encoding. Hope this helps some people.

like image 89
Saturn K Avatar answered Oct 04 '22 22:10

Saturn K


Or locate the file in source explorer and open it's properties Dialog from the context menu.

like image 32
GarethOwen Avatar answered Oct 04 '22 23:10

GarethOwen