Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 104882 - man-1.6a doesnt consider unicode properly
Summary: man-1.6a doesnt consider unicode properly
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 193973 256839 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-09-05 05:21 UTC by Sergey Belyashov
Modified: 2009-01-30 04:07 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
man-unicode.patch (man-unicode.patch,2.05 KB, patch)
2005-09-09 23:31 UTC, SpanKY
Details | Diff
man-unicode.patch (man-unicode.patch,2.05 KB, patch)
2005-09-11 15:49 UTC, SpanKY
Details | Diff
log of emerge man (emerge-man.log,23.22 KB, text/plain)
2005-09-12 05:53 UTC, Sergey Belyashov
Details
sys-apps/man/man-1.6a-r1.ebuild (man-1.6a-r1.ebuild,3.57 KB, text/plain)
2006-07-04 10:46 UTC, Sergey Belyashov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Belyashov 2005-09-05 05:21:55 UTC
ebuild for man-1.6-r1 don't correct determine langauges from LINGUAS variable. 
It use incorrect detection method by man pages. For some languages man pages not 
included in this package, but man support help on this language. For example, 
Russian.

Reproducible: Always
Steps to Reproduce:
1. LINGUAS="en ru" USE="unicode nls" emerge '=man-1.6-r1'
2. LANG=ru_RU.UTF-8 man --help

Actual Results:  
Help on English

Expected Results:  
Help on Russian

I try to solve this bug (and others) and write my version of ebuild (http://
bugs.gentoo.org/attachment.cgi?id=67503).

emerge --info:
Gentoo Base System version 1.6.13
Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.5-
r1, 2.6.12-gentoo-r9 i686)
=================================================================
System uname: 2.6.12-gentoo-r9 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/
config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
LANG="ru_RU.UTF-8"
LINGUAS="en ru"
MAKEOPTS="-j3 -s"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 alsa apm arts avi berkdb bitmap-fonts crypt cups eds emboss encode 
foomaticdb fortran gdbm gif gnome gpm gstreamer gtk2 hal imlib ipv6 jpeg kde 
libg++ libwww mad mbox mikmod mmx mmxext motif mp3 mpeg ncurses nls ogg 
oggvorbis opengl oss pam pdflib perl png python qt quicktime readline samba sdl 
slang spell sse sse2 ssl tcpd tiff truetype truetype-fonts type1-fonts unicode 
userlocales vorbis xml2 xmms xv zlib linguas_en linguas_ru userland_GNU 
kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS
Comment 1 SpanKY gentoo-dev 2005-09-05 14:28:32 UTC
that iconv stuff doesnt belong in the ebuild

ive changed the `strip-linguas` to read the value from configure so that 'ru' is
allowed
Comment 2 SpanKY gentoo-dev 2005-09-09 23:31:06 UTC
Created attachment 68084 [details, diff]
man-unicode.patch

try this patch

i think we also need to re-encode the included manpages too in man/??/*.man
Comment 3 Sergey Belyashov 2005-09-10 06:28:42 UTC
(In reply to comment #2)
> Created an attachment (id=68084) [edit]
> man-unicode.patch
> 
> try this patch
> 
> i think we also need to re-encode the included manpages too in man/??/*.man

I try it. Russian detects correctly. But result is bad - gabage on screen if I 
run 'man --help'. I think, that 'unicode' target do not start from Makefile. (If 
I manually convert messages, then all OK).

With reencoding man pages may be problems. Example:

I emerge man-pages-ru.
Because it in KOI8-R I encode any page (for example cp.1) to utf8 (with iconv)
Try to see what is in (before I copy this page to /usr/share/man/ru/man1)
Result is very very unreadable ('DoXD0XODOSIO' etc., it is not cyrilic ;) ).

I think, if You reencode buildin man-pages then some pages will be unreadable. 
It's need to patch man (or troff) sources...
Comment 4 Sergey Belyashov 2005-09-10 06:31:50 UTC
This http://bugs.gentoo.org/show_bug.cgi?id=104593 bug is about problem with man 
pages in utf8.
Comment 5 SpanKY gentoo-dev 2005-09-11 15:22:21 UTC
if you emerge man with the proposed patch and USE=unicode, then the code pages
should have been re-encoded ...

can you run `emerge man >& log` and post the log as an attachment ?
Comment 6 SpanKY gentoo-dev 2005-09-11 15:49:07 UTC
Created attachment 68204 [details, diff]
man-unicode.patch

how about this one
Comment 7 Sergey Belyashov 2005-09-12 05:53:41 UTC
Created attachment 68242 [details]
log of emerge man

Your new patch is working properly for Russian, but may be problems with
Korean.  ;) See attachement.
Comment 8 Sergey Belyashov 2006-07-04 10:42:16 UTC
Fixed by sys-apps/man-1.6a-r1
Comment 9 Sergey Belyashov 2006-07-04 10:46:33 UTC
Created attachment 90869 [details]
sys-apps/man/man-1.6a-r1.ebuild

Sorry. It is my own ebuild.
Comment 10 Sergey Belyashov 2006-07-04 10:59:17 UTC
sys-apps/man-1.6-r1 also works properly when add key '--manpage' to the NROFF command.
May be it need to make by ebuild?
Comment 11 Sergey Belyashov 2006-07-04 10:59:27 UTC
sys-apps/man-1.6-r1 also works properly when add key '--manpage' to the NROFF command in /etc/man.conf.
May be it need to make by ebuild?
Comment 12 Sergey Belyashov 2006-07-04 11:02:45 UTC
--manpage is key of patched (by me) groff. :)
Comment 13 SpanKY gentoo-dev 2006-07-04 12:16:22 UTC
ive contacted upstream man maintainer about unicode in man and they're working on it ... really i think you should look at man-1.6d and also work with the upstream maintainer to get this resolved ... i have no problem admitting that this is beyond my capabilities to make sure it gets done right ;)

for contact information, please see:
http://primates.ximian.com/~flucifredi/man/
Comment 14 SpanKY gentoo-dev 2007-09-27 13:21:04 UTC
*** Bug 193973 has been marked as a duplicate of this bug. ***
Comment 15 SpanKY gentoo-dev 2009-01-30 04:07:50 UTC
*** Bug 256839 has been marked as a duplicate of this bug. ***