在Windows中获取文件的编码 [英] Get encoding of a file in Windows

查看:319
本文介绍了在Windows中获取文件的编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这不是一个编程问题,是否有命令行或Windows工具(Windows 7)获取文本文件的当前编码?当然我可以写一个C#应用程序,但是我想知道是否有内置的东西?

This isn't really a programming question, is there a command line or Windows tool (Windows 7) to get the current encoding of a text file? Sure I can write a little C# app but I wanted to know if there is something already built in?

推荐答案

打开你的文件使用Windows随附的常规旧香草记事本。

当您点击另存为... 时,将显示文件的编码。

它将如下所示:

Open up your file using regular old vanilla Notepad that comes with Windows.
It will show you the encoding of the file when you click "Save As...".
It'll look like this:

无论默认选择的编码是什么,那就是当前的文件编码方式。


如果是UTF-8,您可以将其更改为ANSI,然后单击保存以更改编码(或反之亦然)。

Whatever the default-selected encoding is, that is what your current encoding is for the file.
If it is UTF-8, you can change it to ANSI and click save to change the encoding (or visa-versa).

我意识到有很多不同类型的编码,但是当我通知我们的导出文件是UTF-8并且它们需要ANSI时,这就是我需要的。这是一次性出口,所以记事本适合我的帐单。

I realize there are many different types of encoding, but this was all I needed when I was informed our export files were in UTF-8 and they required ANSI. It was a onetime export, so Notepad fit the bill for me.

FYI:从我的理解我认为 Unicode (如记事本)对于UTF-16而言是不正确的。

更多记事本的 Unicode 选项: Windows 7 - UTF-8和Unicdoe

FYI: From my understanding I think "Unicode" (as listed in Notepad) is a misnomer for UTF-16.
More here on Notepad's "Unicode" option: Windows 7 - UTF-8 and Unicdoe

这篇关于在Windows中获取文件的编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆