From owner-freebsd-doc@FreeBSD.ORG Thu Mar 31 08:00:26 2011 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DF11106567D for ; Thu, 31 Mar 2011 08:00:26 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 23F958FC18 for ; Thu, 31 Mar 2011 08:00:24 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p2V80KlI086241 for ; Thu, 31 Mar 2011 08:00:20 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p2V80KAv086240; Thu, 31 Mar 2011 08:00:20 GMT (envelope-from gnats) Resent-Date: Thu, 31 Mar 2011 08:00:20 GMT Resent-Message-Id: <201103310800.p2V80KAv086240@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Tim Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA9E01065672 for ; Thu, 31 Mar 2011 07:59:06 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 9AE108FC1B for ; Thu, 31 Mar 2011 07:59:06 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p2V7x6GA001154 for ; Thu, 31 Mar 2011 07:59:06 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p2V7x5Ue001153; Thu, 31 Mar 2011 07:59:05 GMT (envelope-from nobody) Message-Id: <201103310759.p2V7x5Ue001153@red.freebsd.org> Date: Thu, 31 Mar 2011 07:59:05 GMT From: Tim To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: docs/156081: troff falls with troff.core with UTF-8 man with incorrect symbols displaying for kernel UTF-8 X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2011 08:00:26 -0000 >Number: 156081 >Category: docs >Synopsis: troff falls with troff.core with UTF-8 man with incorrect symbols displaying for kernel UTF-8 >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Thu Mar 31 08:00:20 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Tim >Release: 8.2-STABLE >Organization: >Environment: FreeBSD timfree.ibmc.msk.ru 8.2-STABLE FreeBSD 8.2-STABLE #0: Wed Mar 30 16:09:42 MSD 2011 root@timfree.ibmc.msk.ru:/usr/obj/usr/src/sys/KERN_2011_03_30 amd64 >Description: man pages for UTF-8 encoding at least for russian language cause troff falling with troff.core, and all text is in incorrect character set for kernel with embeded UTF-8 and UTF-8 locale specified (with xterm tty, with LANG, etc.) >How-To-Repeat: 1. make kernel UTF-8 and UTF-8 locale 2. install vim 3. man vim >Fix: *roff system not understand standart unicode symbols, but man send to *roff exactly UTF-8 without any transformations: Principles of man -d for FreeBSD (with vim as example): ----------------------- zcat /usr/local/man/ru.UTF-8/man1/vim.1.gz |\ tbl |\ groff -S -Wall -mtty-char -man -Tutf8 -dlocale=ru.UTF-8 |\ col | less ---------------------- In Linux there is preconv between zcat and *roff: Principles of man -d vim for Ubuntu (as Linux example): ------------------------------- zcat /usr/share/man/ru/man1/vim.1.gz |\ preconv -e UTF-8 |\ tbl |\ nroff -mandoc -rLL=97n | less ------------------------- preconv make \[uXXXX] char sequences for any UTF symbol and these sequences understand *roff. In FreeBSD such preconv is absent. And this cause title effect. Usage iconv such a way: zcat vim.1.gz |iconv -f utf-8 -t koi8-r |nroff -mandoc -Tkoi8-r |iconv -t utf-8 -f koi8-r|less is workaround of this problem, while nroff work correctly with koi8. >Release-Note: >Audit-Trail: >Unformatted: