A Command Line Encoding Convertor in .Net
*If you are looking for something to transcode audio, please do a google on LAME, besweet. You can also take a look at one of my old work http://paradiso.cn/converter/any2wav.htm
*If you are looking for cmdline video encoding, please try mencoder, ffmpeg, etc. You can look for help in Doom9 forum.
The tool I talk here is only for TEXT encoding problems.
Well, this is a pretty simple and stupid tool. It contains no more than 10 lines of useful C# code, and the performance is not very good. But sometimes, when you want to deal with stupid problems, you have to use such tool. I like GNU's iconv, but there's no good port on Windows.
So, I have to write one for my own usage.
http://cid-8007edf5c56fc334.skydrive.live.com/self.aspx/Public/ec.rar
Usage: ec inputfile outputfile [input Encoding] [output Encoding]
No wildcard support, but you can simply do a trick in command shell.
For example, you want to convert all xml files in every sub-directory from GB2312 to UTF8, you need to type the following:
for /R %%i in (*.xml) do (ec %i %i GB2312 UTF8)
Then, job done.
Another way is to use powershell.
PS C:\temp> $a = type gb2312.txt
PS C:\temp> out-file -filepath utf8.txt -inputobject $a -encoding utf8
It's also very easy, but sometimes you cannot control all the process...