|
|
搜索了论坛中的老帖子,原因在于groff对UTF8的处理有问题。但是多是建议不安装man-pages-zh_CN直接看英文,不能显示中文的本质问题还是没有解决。
groff-utf8 提供了一个让groff间接支持UTF8的办法。
使用下面的ebuild(参考别人的做了点修改),最后按照后面的提示,修改 /etc/man.conf
/usr/local/portage/app-text/groff-utf8
- # Copyright 1999-2006 Gentoo Foundation
- # Distributed under the terms of the GNU General Public License v2
- # $Header: $
- DESCRIPTION="GNU groff wrapper allowing UTF-8 input"
- HOMEPAGE="http://www.haible.de/bruno/packages-groff-utf8.html"
- SRC_URI="http://www.haible.de/bruno/gnu/${PN}.tar.gz"
- LICENSE="GPL-2"
- SLOT="0"
- KEYWORDS="x86 amd64"
- IUSE=""
- DEPEND=">=sys-apps/groff-1.18.1"
- S="${WORKDIR}/${PN}"
- src_install() {
- make install DESTDIR=${D} PREFIX=/usr || die "make install failed"
- }
- pkg_postinst() {
- elog "Sample use:"
- elog "$ groff-utf8 -Tutf8 -mandoc find.vi.1 | less"
- elog "$ groff-utf8 -Thtml -mandoc find.vi.1 > find.html; mozilla find.html"
- elog
- elog "You can also in /etc/man.conf edit the definitions of the"
- elog "variables troff and nroff, to use groff-utf8 instead of groff."
- elog "For example:"
- elog "NROFF /usr/bin/groff-utf8 -Tutf8 -c -mandoc"
- elog
- elog "Of course this is only a stopgap measure, until groff can process"
- elog "UTF-8 encoded man pages by itself, sometime in the future. "
- }
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|