gentoo 控制台中的俄语字母为“?”

gentoo 控制台中的俄语字母为“?”

我设法在我的 Gnome 应用程序中使用俄语,但无论是在控制台(Alt-Shift-F2 等)还是在 Gnome 终端中都无法使用

valyagentoo va1en0k # locale
LANG=ru_RU.UTF-8
LC_CTYPE="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_COLLATE="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"
LC_PAPER="ru_RU.UTF-8"
LC_NAME="ru_RU.UTF-8"
LC_ADDRESS="ru_RU.UTF-8"
LC_TELEPHONE="ru_RU.UTF-8"
LC_MEASUREMENT="ru_RU.UTF-8"
LC_IDENTIFICATION="ru_RU.UTF-8"
LC_ALL=ru_RU.UTF-8


valyagentoo va1en0k # cat /etc/conf.d/consolefont 
# /etc/conf.d/consolefont

# CONSOLEFONT specifies the default font that you'd like Linux to use on the
# console.  You can find a good selection of fonts in /usr/share/consolefonts;
# you shouldn't specify the trailing ".psf.gz", just the font name below.
# To use the default console font, comment out the CONSOLEFONT setting below.
# This setting is used by the /etc/init.d/consolefont script (NOTE: if you do

CONSOLEFONT="UniCyr-sans"

# CONSOLETRANSLATION is the charset map file to use.  Leave commented to use
# the default one.  Have a look in /usr/share/consoletrans for a selection of
# map files you can use.

# CONSOLETRANSLATION="8859-1_to_uni"

答案1

以下是我的一些建议:

  • 您启用了unicodeuseflag 吗?如果没有它,zsh就不会使用 Unicode 支持进行编译。如果您使用bash,它应该通过 libreadline 获得 Unicode 支持。ksh而且,tcsh根本不支持 Unicode。
  • 它也可能是您的区域设置或字体选择,但从我收集到的信息来看,它们看起来不错。只需确保列出您的区域设置并在命令行上/etc/locale.gen生成它即可。locale-gen

另外,请看一下在 Gentoo 中使用 UTF-8Gentoo 文档中的指南。

答案2

您是否尝试过将 consolefont 更改为其他值?我也遇到了同样的问题

    consolefont="cyr-sun16"

对我来说效果很好。

答案3

$ emerge terminus-font corefonts cronyx-fonts freefonts
$ nano /etc/locale.gen
<<enter this>>
ru_RU.UTF-8 UTF-8
$ nano  /etc/conf.d/consolefont
<<enter this>>
CONSOLEFONT="cyr-sun16"
$ nano /etc/env.d/02locale
<<enter this>>
LC_ALL=""
LANG="ru_RU.UTF-8"LC_ALL=""
LANG="ru_RU.UTF-8"
$ locale-gen 
$ /etc/init.d/consolefont restart
$ env-update 
$ source /etc/profile

相关内容