Is there any way to find what is the default character encoding in Windows? I know that in Western Europe and the US, CP-1252 is the default, but need to check this on other Windows machines too.

Alternatively, is there any list of default encodings per locale?

  • It is related to customer support, not programming. The control panel applet has been renamed in every Windows version. XP calls it "Regional and Language Options" iirc, Win7 calls it "Region and Language", Win8 calls it "Region". Given that you are interested in different code pages, you'll have to figure out the localized name for the applet to give the customer the correct instructions. Perhaps a little program you write yourself starts sounding attractive? – Hans Passant Nov 5 '13 at 19:29
  • The default character encoding on Windows is UTF-16. What you may be referring to is the default legacy codepage that is used for ancient non-Unicode applications and all the ANSI API functions (which honestly should never be relevant for current software, alas it sadly all too often is). – Joey Nov 6 '13 at 6:12
  • @Joey: Right. Unfortunately I have to read files which were generated by these ancient non-Unicode applications :-/ – Grodriguez Nov 6 '13 at 17:40
  • 1
    @HansPassant: Sorry, but it is not related to customer support, it is related to programming. I don't want to give any instructions to the customer. That's the point of my question. I need my code to be able to read files generated by a non-Unicode application, and for that I need to know the default encoding based on the user's locale. – Grodriguez Nov 6 '13 at 17:42

You can check with PowerShell:


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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.