How can I get the encoding of my system?

7

Is there any command for command prompt through which I can know the default encoding of my system?

Aayushi

Posted 2010-02-26T11:40:44.127

Reputation:

4Does the command "chcp" work? That will show the code page currently set for CMD. – music2myear – 2013-04-02T19:45:50.040

Answers

4

Just head to the 'Control Panel' → 'Regional and Language Options' → 'Advanced' tab.

Or

Microsoft Docs has a solution to get the encoding for the operating system's current ANSI code page. You can use the following VB code:

'Declaration (FYI)
'Public Shared ReadOnly Property Default As Encoding


'Usage
Dim value As System.Text.Encoding
value = System.Text.Encoding.Default
System.Console.WriteLine(value.WebName) ' (e.g.)

There are also syntaxes for C#, C++ and JScript. Have a look at Microsoft Docs for more info.

Mehper C. Palavuzlar

Posted 2010-02-26T11:40:44.127

Reputation: 51 093