gpt4 book ai didi

Emacs:有没有办法确定文件的编码系统?

转载 作者:行者123 更新时间:2023-12-04 14:50:24 25 4
gpt4 key购买 nike

假设我打开一个文件并在那里找到

Ïåñíÿ àëüïèíèñòîâ

等等。我可以让 emacs 找到正确的编码吗?例如,AkelPad 具有这样的功能——在大多数情况下,它会打开一个具有正确编码的文件。

最佳答案

本页 http://www.gnu.org/s/libtool/manual/emacs/Recognize-Coding.html解释了 emacs 检测编码系统的系统。你可以在一定程度上控制它:

The variables auto-coding-alist, auto-coding-regexp-alist and auto-coding-functions are the strongest way to specify the coding system for certain patterns of file names, or for files containing certain patterns



您可能无意中禁用了此功能:

However, there may be cases that you want to read escape sequences in a file as is. In such a case, you can set the variable inhibit-iso-escape-detection to non-nil. Then the code detection ignores any escape sequences, and never uses an ISO-2022 encoding. The result is that all escape sequences become visible in the buffer.

关于Emacs:有没有办法确定文件的编码系统?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7455976/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com