批处理文件以将unicode文本转换为Ansi文本 [英] Batch file to covert unicode text to Ansi text
本文介绍了批处理文件以将unicode文本转换为Ansi文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用批处理文件将预先存在的文本目录从Unicode转换为ANSI?是否有一些我可以用来遍历文件并执行转换的工具?
How can I convert a directory of pre-existing text from Unicode to ANSI with a batch file? Is there some tool that I can use to loop through the files and perform the conversion?
推荐答案
See https://superuser.com/questions/27060/batch-convert-files-for-encoding-or-line-ending. Specifically, iconv looks exactly like what you're looking for.
您正在寻找此处发布的示例的反面,因此您需要这样的内容:
You're looking for the reverse of the example posted there, so you'd want something like this:
$ iconv -f utf-8 -t windows-1252 infile > outfile
这篇关于批处理文件以将unicode文本转换为Ansi文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文