Here you can download a Windows console application that can be used to change the encoding of a text file. For example you can convert the content of a file that has an UTF encoding to an ANSI encoding.
How to use it:
- Download the application
- Open command prompt
- Launch the application passing the following arguments separated with a space:
- The path to the folder that contains the files to be converted. Example: C:\Files
- A file pattern (see the next link for details about the available wildcard characters http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/find_c_search_where.mspx?mfr=true). Example: *.csv
- The desired encoding. Example: ANSI
For example, let’s suppose that you’re calling the application passing the arguments: C:\Files *.csv ANSI (like in the image above). In this case, the application will convert to an ANSI encoding all the files with the extension .csv that are located under the folder C:\Files.
The complete list of available encodings can be found on MSDN.
You can see the same list by launching the console application with the command prompt and passing the argument: HELP
Below is a list with the most common encodings that you can use:
|Code Page||Name||Display Name|
|1201||unicodeFFFE||Unicode (Big endian)|
|1250||windows-1250||Central European (Windows)|
|1252||Windows-1252||Western European (Windows)|
|12001||utf-32BE||Unicode (UTF-32 Big endian)|
Finally, if you want to see the source code, you can find it at http://encodingconverterconsoleapplication.codeplex.com/