Finding out the default character encoding in Windows
2014-07
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?
You can check with PowerShell:
[System.Text.Encoding]::Default
which even enables you to check that across several machines at once.
Possible Duplicate:
Batch-convert files for encoding or line ending under Windows
Hey!
I have many files that are encoded in the ANSI (iso-8859-1) format and I want to change it to utf8.
I am converting one by one using notepad++ but I was wondering if there is any application that will convert them all (I have many files) in a quick and easy way.
Anyone know of one app that will do this?? (free app would be great)
Thanks
This is a perfect fit for a scripting language to convert Windows-1252 to UTF-8.
- Here is a Python and Ruby script.
- Here is a Bash script using iconv.
You could try this SourceForge app. From the website:
Codepage Converter - Convert HTML/Text files to different encoding formats e.g. ANSI to UTF-8 or Unicode. Convert multiple files with 1 click. Works with all encodings
A bit late, but: If you saved your scripts as 'UTF without BOM' and notepad++ is now opening them as ansi -> you can 'fix' this behaviour by including a string of multibyte characters somewhere in your comments to force notepad++ to recognise the UTF encoding of the file. It's a complete hackjob, but it works ;-)