EncodingConverter Console Application

EncodingConverter
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:

  1. Download the application
  2. Open command prompt
  3. Launch the application passing the following arguments separated with a space:
    1. The path to the folder that contains the files to be converted. Example: C:\Files
    2. 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
    3. 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
EncodingConverter HelpBelow is a list with the most common encodings that you can use:

Code Page Name Display Name
1200 utf-16 Unicode
1201 unicodeFFFE Unicode (Big endian)
1250 windows-1250 Central European (Windows)
1251 windows-1251 Cyrillic (Windows)
1252 Windows-1252 Western European (Windows)
1253 windows-1253 Greek (Windows)
1254 windows-1254 Turkish (Windows)
1255 windows-1255 Hebrew (Windows)
1256 windows-1256 Arabic (Windows)
1257 windows-1257 Baltic (Windows)
1258 windows-1258 Vietnamese (Windows)
12000 utf-32 Unicode (UTF-32)
12001 utf-32BE Unicode (UTF-32 Big endian)
20127 us-ascii US-ASCII
65000 utf-7 Unicode (UTF-7)
65001 utf-8 Unicode (UTF-8)

Finally, if you want to see the source code, you can find it at http://encodingconverterconsoleapplication.codeplex.com/