0

我正在使用带有 urxvt-unicode 的 Arch Linux,当我执行命令来测试我的终端是否与 Prezto 兼容时,它缺少一些字符:

在此处输入图像描述

我的语言环境如下:

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
4

1 回答 1

0

嗯,以下Python 3.5.1脚本显示某些字符是CoUnicode 类别,即Other, Private Use。因此,您的应用程序应使用包含此类私有字符的字体来正确呈现它们。

>>> import unicodedata
>>>
>>> for char in u'\ue0b0',u'\u00b1',u'\ue0a0',u'\u27a6',u'\u2718',u'\u26a1',u'\u2699':
...     print (char, unicodedata.category(char), unicodedata.name(char,'private use'))
...
 Co private use
± Sm PLUS-MINUS SIGN
 Co private use
➦ So HEAVY BLACK CURVED UPWARDS AND RIGHTWARDS ARROW
✘ So HEAVY BALLOT X
⚡ So HIGH VOLTAGE SIGN
⚙ So GEAR
>>>

比较类似PowerShell脚本的结果:

> 0xe0b0,0x00b1,0xe0a0,0x27a6,0x2718,0x26a1,0x2699 | Get-CharInfo | Format-Table -AutoSize

Char CodePoint    Category Description                                    
---- ---------    -------- -----------                                    
    U+E0B0     PrivateUse Private Use                                    
   ± U+00B1     MathSymbol Plus-Minus Sign                                
    U+E0A0     PrivateUse Private Use                                    
   ➦ U+27A6    OtherSymbol Heavy Black Curved Upwards And Rightwards Arrow
   ✘ U+2718    OtherSymbol Heavy Ballot X                                 
   ⚡ U+26A1    OtherSymbol High Voltage Sign                              
   ⚙ U+2699    OtherSymbol Gear                                           
于 2017-02-02T22:00:02.637 回答