运行man命令时,出现乱码,网上搜索了许久,后来终于在gentoo论坛上找到了:
1、安装groff-utf8(注:gentoo-zh中有,需要安装layman):
emerge -av groff-utf8
注:以下步骤已过时!!安装完成后不用任何配置了!!
安装完成后,你会看到如下提示:
* Sample usage: * $ groff-utf8 -Tutf8 -mandoc find.vi.1 | less * $ groff-utf8 -Thtml -mandoc find.vi.1 > find.html; mozilla find.html * * You can also modify the TROFF/NROFF settings in your /etc/man.conf * to make it use groff-utf8 instead of groff. * For example: * NROFF /usr/bin/groff-utf8 -Tutf8 -c -mandoc
2、按上面要求做就行了,下面是我修改/etc/man.conf的示例:
#TROFF /usr/bin/groff -Tps -mandoc #NROFF /usr/bin/nroff -mandoc TROFF /usr/bin/groff-utf8 -Tutf8 -mandoc NROFF /usr/bin/groff-utf8 -Tutf8 -c -mandoc