有没有办法在 UltraEdit 中获取文本文件的编码?

发布于 2024-08-03 02:00:20 字数 37 浏览 9 评论 0原文

UltraEdit 中是否有一个设置可以让我查看文件的编码?

Is there a setting in UltraEdit that allows me to see the encoding of the file?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

花开柳相依 2024-08-10 02:00:20

在 UltraEdit 中,用于“显示”文件的编码显示在状态栏右侧某处,以及所使用的行结束类型,例如“U8-UNIX”。您还可以手动设置文件必须显示的编码。在版本 10 中,它位于菜单查看 -> 设置代码页。您还可以在菜单文件 -> 下-转换-文件的实际代码页。 转化

如果文件没有 BOM 标头,则文件开头的几个字节指示编码,即文件的实际编码,只能猜测。即使文件具有 BOM 标头,仍然可能存在编码问题。

所有文本编辑器都这样做,并且有些文本编辑器比其他文本编辑器更擅长。我还没有比较过哪个最擅长。目前(2012 年),我知道 UltraEdit 无法检测 UTF-8 和其他变体如果第一个 UTF-8 字符仅出现在文档的后面,则在 1000 行(或更长)的文本文件中。当您手动设置编码时,它也无法正确显示编码。

Notepad++ 也不能很好地检测它,但是当你知道编码时,你可以手动设置它。

据我所知, Sublime Text 最擅长检测编码,即使在大文件中也是如此。

我认为还有一些非常好的命令行工具,从 GNU 移植到 Windows,来检测编码。我敢打赌,这将是最好的选择。

In UltraEdit, the encoding that is being used to -display- the file, is shown in the status bar at the right somewhere, together with the line-ending type in use, for example, "U8-UNIX". You can also manually set as what encoding the file has to be displayed. In version 10 this is under menu View -> Set Code Page. You can also -convert- the actual codepage of the file under menu File -> Conversions.

If the file does not have a BOM header, a couple of bytes at the start of the file indicating the encoding, the -actual- encoding of the file, can only be guessed. And even if the file has a BOM header, there can still be encoding issues.

All text editors do this, and some are better at it than others. I haven't done a comparision to see which is best at it. At the moment (2012), I know UltraEdit fails to detect UTF-8 and other variants in 1000 line (or longer) text files if the first UTF-8 character only appears later in the document. It also fails to show the encoding properly when you set it manually.

Notepad++ is also not great at detecting it, but when you know the encoding, you can set it manually.

Sublime Text is, as far as I know, best at detecting the encoding, also in large files.

I think there are also some very good command line tools out there, ported from GNU to Windows, to detect encoding. My bet would be that that's going to be the best option.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文