如何在Windows中将CSV文件从UTF-8设置为ANSI?
我正在使用一个旧的应用程序无法处理UTF-8字符。 CSV文件是SFTP到具有默认UTF-8的文件夹。有没有办法自动将UTF-8转换为ANSI? 这可以在Windows设置中完成,还是我必须放一些代码来转换它们?
谢谢你!
I am using an old app cannot handle UTF-8 characters.
The csv files are SFTP to a folder with default UTF-8. Is there a way to automatically convert UTF-8 to ANSI?
Can this be done in windows setting or I have to put some code to convert them?
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从历史上看,我已经使用了自己的自定义工具来做到这一点。
但是如今,如果已安装了WSL,Cygwin或Mingw,则可以使用GNU ICONV工具进行转换,然后再使用其他工具(例如
head> head -c 3
)来检查是否是否输入文件具有3个字节UTF-8编码的BOM字符作为文件格式标记。Historically, I have used my own custom tools to do this.
But these days, if you have WSL, CygWin or MingW installed, you can use the GNU iconv tool to do the conversion, after first using other tools (such as
head -c 3
) to check if the input file has the 3 byte UTF-8 encoded BOM character as a file format marker.