emacs - 在 GNU Emacs 中查找字符的 Unicode 代码点

标签 emacs unicode

在 XEmacs 中,这是通过对字符调用函数 char-to-ucs 来完成的。 GNU Emacs 好像没有这个功能。在 GNU Emacs 中,字符似乎是普通整数。在拉丁字符上运行 C-x = 显示 Emacs 代码点与相应字符的 Unicode 代码点不同。如何在 GNU Emacs 中找到字符的 Unicode 代码点?

最佳答案

在现代 Emacs 中, M-x describe-char 将告诉您当前的字符。
一个例子:

  character: ¢ (2210, #o4242, #x8a2, U+00A2)
    charset: latin-iso8859-1
         (Right-Hand Part of Latin Alphabet 1 (ISO/IEC 8859-1): ISO-IR-100.)
 code point: #x22
     syntax: w  which means: word
   category: l:Latin
buffer code: #x81 #xA2
  file code: #xC2 #xA2 (encoded by coding system utf-8)
    display: by this font (glyph code)
     -apple-monaco-medium-r-normal--12-120-72-72-m-120-mac-roman (#xA2)

注意第一部分中的 U+00A2,它给出了字符的 Unicode 代码点。

关于emacs - 在 GNU Emacs 中查找字符的 Unicode 代码点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/236097/

相关文章:

emacs - Emacs 中 C 键的替代方案?

javascript - 使用 Unicode 分割字符串

regex - 如何将西里尔字母与正则表达式匹配

vb.net - 如何在VB.Net字符串文字中表示Unicode字符?

c# - Unicode 名称正则表达式

c++ - 在 Linux 上启用 Unicode 16

debugging - 如何以编程方式使用 edebug 触发或检测?

c++ - 当我在Emacs中执行 'compile'命令时,如何自动给出当前缓冲区的文件名?

emacs - 在 repl 中重新加载一个 ns

Emacs 每帧制作 ibuffer 过滤器