The Computer Oracle

Finding out the default character encoding in Windows

-------------------------------------------------------------------------------
Become or hire the top 3% of the developers on Toptal https://topt.al/25cXVn
-------------------------------------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Riding Sky Waves v001

--

Chapters
00:00 Question
00:31 Accepted answer (Score 43)
00:48 Answer 2 (Score 3)
01:25 Thank you

--

Full question
https://superuser.com/questions/670197/f...

Question links:
[CP-1252]: http://en.wikipedia.org/wiki/Windows-125...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#windows #characterencoding

#avk47



ACCEPTED ANSWER

Score 44


You can check with PowerShell:

[System.Text.Encoding]::Default

which even enables you to check that across several machines at once.




ANSWER 2

Score 3


In .NET Core and .NET 5+ it is System.Text.Encoding.Default gives instance of UTF8. While .NET 4 and previous versions return Windows Active one. You can find more details on following: Microsoft Reference for Encoding

enter image description here