Package: man-db; Maintainer for man-db is Colin Watson <cjwatson@debian.org>; Source for man-db is src:man-db (PTS, buildd, popcon).
Reported by: Fumitoshi UKAI <ukai@debian.or.jp>
Date: Fri, 21 May 1999 20:03:01 UTC
Severity: important
Found in versions 2.3.10-69g, 2.3.10-69i
Fixed in version man-db/2.3.10-69j
Done: Fabrizio Polacco <fpolacco@debian.org>
Bug is archived. No further changes may be made.
View this report as an mbox folder, status mbox, maintainer mbox
Report forwarded to debian-bugs-dist@lists.debian.org, Fabrizio Polacco <fpolacco@debian.org>
:
Bug#38107
; Package man-db
.
(full text, mbox, link).
Acknowledgement sent to Fumitoshi UKAI <ukai@debian.or.jp>
:
New bug report received and forwarded. Copy sent to Fabrizio Polacco <fpolacco@debian.org>
.
Your message specified a Severity: in the pseudo-header, but the severity value `important (for japanese user)' was not recognised. The default severity `normal' is being used instead. The recognised values are: critical grave important normal wishlist fixed.
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: man-db Version: 2.3.10-69g Severity: important (for Japanese user) The current verison of man-db could not handle Japanese pages because it always uses latin1 as nroff device. I think man-db would not works for other languages which is not using latin1 character sets, such as Korean/Chinese... However, there are already jgroff/jless packages in debian. jgroff is the package replacing groff package and it provides `nippon' device to handle Japanese roff pages correctly. So, if we apply the following patch to man-db-2.3.10-69g and install jgorff instead of groff install jless instead of less (and set JLESSCHARSET environment variable as `japanese') install manpages-ja then we can see Japanese manual pages! I think it's better that manpages-ja depends on (or recommends?) jgroff and jless. Note that the point of this patches are - detect manpages is Japanese or not by manpath of the man pages - if Japanese pages, add -Tnippon to nroff options Of course, this is *very* quick hack, but it does not harm any users and it works very well for Japanese users. I don't know whether it works for Korean/Chinese and so on. BTW, we should think how to internationalize man-db. diff -Nru man-db-2.3.10/include/manconfig.h.in man-db-2.3.10.ja/include/manconfig.h.in --- man-db-2.3.10/include/manconfig.h.in Sat May 22 04:21:17 1999 +++ man-db-2.3.10.ja/include/manconfig.h.in Sat May 22 04:02:56 1999 @@ -127,6 +127,8 @@ #ifndef NROFF_MISSING # ifndef NROFF # define NROFF "@nroff@" +/* Japanese hack: 1999/05/22: ukai@debian.or.jp */ +# define NROFF_JA "@nroff@ -Tnippon " # endif #endif diff -Nru man-db-2.3.10/src/man.c man-db-2.3.10.ja/src/man.c --- man-db-2.3.10/src/man.c Sat May 22 04:21:18 1999 +++ man-db-2.3.10.ja/src/man.c Sat May 22 04:20:24 1999 @@ -376,6 +376,9 @@ static int ascii; /* insert tr in the output pipe */ static int save_cat; /* security breach? Can we save the cat? */ +/* Japanese hack: 1999/05/22 ukai@debian.or.jp */ +static int japanese; /* japanese page? */ + static int found_a_stray; /* found a straycat */ #ifdef MAN_CATS @@ -1352,7 +1355,12 @@ #ifdef NROFF_MISSING assert (0); #else +/* Japanese hack: 1999/05/22: ukai@debian.or.jp */ + if (japanese) { + filter = NROFF_JA; + } else filter = NROFF; + #endif } @@ -2240,8 +2248,10 @@ free(catpath); } else database = mkdbname(manpath); - +/* Japanese hack: 1999/05/22: ukai@debian.or.jp */ + japanese = (strstr(manpath, "/ja") != NULL); in_cache = lookup(manpath); /* have we looked here already? */ + if ( !in_cache ) { if ( (dbf = MYDBM_RDOPEN(database)) && !dbver_rd(dbf)) { Regards, Fumitoshi UKAI
Severity set to `important'.
Request was from Taketoshi Sano <xlj06203@nifty.ne.jp>
to control@bugs.debian.org
.
(full text, mbox, link).
Information forwarded to debian-bugs-dist@lists.debian.org, sano@debian.org, Fabrizio Polacco <fpolacco@debian.org>
:
Bug#38107
; Package man-db
.
(full text, mbox, link).
Acknowledgement sent to Taketoshi Sano <xlj06203@nifty.ne.jp>
:
Extra info received and forwarded to list. Copy sent to sano@debian.org, Fabrizio Polacco <fpolacco@debian.org>
.
(full text, mbox, link).
Message #12 received at 38107@bugs.debian.org (full text, mbox, reply):
Package: man-db Version: 2.3.10-69i Severity: important (for Japanese user) Since ukai's patch is for 2.3.10-69g, and current potato man-db is 2.3.10-69i, I worked again to match the previous patch for current man-db package. And I change the patch to use the static variable "internal-locale" which has the value of "LANG" environment variable, and remove previous static variable "japanese". Using this mechanism, I suppose that it will be possible to enhance the support for other multibyte languages. Anyway, here it is. Please use this and implement the support for non-latins languages in official Debian package of man-db. === === === === === === === === === === === === --- ../man-db-2.3.10/include/manconfig.h.in Wed Sep 8 11:44:40 1999 +++ ./man-db-2.3.10/include/manconfig.h.in Wed Sep 8 13:04:57 1999 @@ -127,6 +127,8 @@ #ifndef NROFF_MISSING # ifndef NROFF # define NROFF "@nroff@" +/* Japanese hack: 1999/05/22: ukai@debian.or.jp */ +# define NROFF_JA "@nroff@ -Tnippon " # endif #endif --- ../man-db-2.3.10/src/man.c Wed Sep 8 11:44:40 1999 +++ ./man-db-2.3.10/src/man.c Wed Sep 8 13:40:13 1999 @@ -150,6 +150,9 @@ static int global_manpath = -1; /* global or user manual page hierarchy? */ static int skip; /* page exists but has been skipped */ +/* quick escape for i18n of man-db, Sep 8 1999 t.sano */ +static char *internal_locale; + #if defined _AIX || defined __sgi char **global_argv; #endif @@ -717,7 +720,6 @@ { int argc_env, status = 0, exit_status = OK; char **argv_env, *tmp; - char *internal_locale; char *nextarg; extern int optind; void (int_handler)( int); @@ -841,7 +843,12 @@ if (optind == argc) gripe_no_name (NULL); - putenv("LESSCHARSET=latin1"); +/* check the contents of "LANG" environment - Sep 8 1999 t.sano */ + if ( strncmp(internal_locale, "ja", 2) == 0 ) { + putenv("LESSCHARSET=ja"); + } else { + putenv("LESSCHARSET=latin1"); + } signal( SIGINT, int_handler); @@ -1346,7 +1353,15 @@ #ifdef NROFF_MISSING assert (0); #else - filter = NROFF; +/* Japanese hack: 1999/05/22: ukai@debian.or.jp */ +/* check the contents of "LANG" environment - Sep 8 1999 t.sano */ + if ( strncmp(internal_locale, "ja", 2) + == 0 ) { + filter = NROFF_JA; + } else { + filter = NROFF; + } + #endif } === === === === === === === === === === === === Thanks. -- Taketoshi Sano: <sano@debian.org>,<sano@debian.or.jp>,<kgh12351@nifty.ne.jp>
Information forwarded to debian-bugs-dist@lists.debian.org, Fabrizio Polacco <fpolacco@debian.org>
:
Bug#38107
; Package man-db
.
(full text, mbox, link).
Acknowledgement sent to Fabrizio Polacco <fab@prosa.it>
:
Extra info received and forwarded to list. Copy sent to Fabrizio Polacco <fpolacco@debian.org>
.
(full text, mbox, link).
Message #17 received at 38107@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
On Wed, Sep 08, 1999 at 02:58:27PM +0900, Taketoshi Sano wrote: > > Since ukai's patch is for 2.3.10-69g, and current potato man-db is > 2.3.10-69i, I worked again to match the previous patch for current > man-db package. Thanx for the patch. As I'm currently working to get 69j out, I'm applying it immediately (otherwise it will surely slip below the pile :-( ). > Anyway, here it is. Please use this and implement the support for > non-latins languages in official Debian package of man-db. As I had already planned to do with the previous patch, I indend to modify it havily. > +++ ./man-db-2.3.10/include/manconfig.h.in Wed Sep 8 13:04:57 1999 > @@ -127,6 +127,8 @@ > #ifndef NROFF_MISSING > # ifndef NROFF > # define NROFF "@nroff@" > +/* Japanese hack: 1999/05/22: ukai@debian.or.jp */ > +# define NROFF_JA "@nroff@ -Tnippon " > # endif > #endif I will not apply that one. Why? Because this new macro adds an argument which can already be supplied though the argument -T . This patch would conflict with a contemporary use of the option -T which I think should not be removed. As the argument of the option -T is loaded in the var "roff_device", and you're using the macro in dependance of the content of the ENV var LANG, I will provide "nippon" as the default content of the var "roff_device", in case of LANG value "ja" (in the future we could change this to be in a table: LANG<=>roff_device<=>LESSCHARSET, which should work also for other non-latin1 locales. > +++ ./man-db-2.3.10/src/man.c Wed Sep 8 13:40:13 1999 > @@ -150,6 +150,9 @@ > > +/* quick escape for i18n of man-db, Sep 8 1999 t.sano */ > +static char *internal_locale; > + as this is required by the use of the macro I already skipped, I'll skip also this change. > @@ -841,7 +843,12 @@ > if (optind == argc) > gripe_no_name (NULL); > > - putenv("LESSCHARSET=latin1"); > +/* check the contents of "LANG" environment - Sep 8 1999 t.sano */ > + if ( strncmp(internal_locale, "ja", 2) == 0 ) { > + putenv("LESSCHARSET=ja"); > + } else { > + putenv("LESSCHARSET=latin1"); > + } Here, the setting of LESSCHARSET was clearly unfair. As a minimum, it should have checked the existing content of it. I will add this, to permit overwrite of the default. The entry in the table will be: LANG roff_device LESSCHARSET ja nippon ja * NULL latin1 it will be interesting to see how this will help other 2byte charset and/or other langs like latin2 or greek ... > @@ -1346,7 +1353,15 @@ > +/* Japanese hack: 1999/05/22: ukai@debian.or.jp */ > +/* check the contents of "LANG" environment - Sep 8 1999 t.sano */ > + if ( strncmp(internal_locale, "ja", 2) > + == 0 ) { > + filter = NROFF_JA; > + } else { > + filter = NROFF; > + } > + No more need for this also. === few minutes later ==== Here it is; find attached the patch I used. It works as expected, except that groff fails: /usr/bin/groff:fatal error: invalid device `nippon' man: command exited with status 768: /usr/bin/zsoelim '/tmp/zmanNHhOhD' | /usr/bin/groff -mandoc -Tnippon Shouldn't we patch also groff ? fab -- | fab@pukki.ntc.nokia.com fpolacco@prosa.it fpolacco@debian.org | 6F7267F5 fingerprint 57 16 C4 ED C9 86 40 7B 1A 69 A1 66 EC FB D2 5E | fabrizio.polacco@nokia.com gsm: +358 (0)40 707 2468
[man.c.diff (text/plain, attachment)]
Information forwarded to debian-bugs-dist@lists.debian.org, Fabrizio Polacco <fpolacco@debian.org>
:
Bug#38107
; Package man-db
.
(full text, mbox, link).
Acknowledgement sent to Fumitoshi UKAI <ukai@debian.or.jp>
:
Extra info received and forwarded to list. Copy sent to Fabrizio Polacco <fpolacco@debian.org>
.
(full text, mbox, link).
Message #22 received at 38107@bugs.debian.org (full text, mbox, reply):
At Thu, 9 Sep 1999 05:55:25 +0300, Fabrizio Polacco <fab@prosa.it> wrote: > > Since ukai's patch is for 2.3.10-69g, and current potato man-db is > > 2.3.10-69i, I worked again to match the previous patch for current > > man-db package. > > Thanx for the patch. > As I'm currently working to get 69j out, I'm applying it immediately Thanks! > > +++ ./man-db-2.3.10/include/manconfig.h.in Wed Sep 8 13:04:57 1999 > > @@ -127,6 +127,8 @@ > > #ifndef NROFF_MISSING > > # ifndef NROFF > > # define NROFF "@nroff@" > > +/* Japanese hack: 1999/05/22: ukai@debian.or.jp */ > > +# define NROFF_JA "@nroff@ -Tnippon " > > # endif > > #endif > > I will not apply that one. > Why? Because this new macro adds an argument which can already be > supplied though the argument -T . This patch would conflict with a > contemporary use of the option -T which I think should not be removed. > As the argument of the option -T is loaded in the var "roff_device", and > you're using the macro in dependance of the content of the ENV var LANG, > I will provide "nippon" as the default content of the var "roff_device", > in case of LANG value "ja" (in the future we could change this to be in > a table: LANG<=>roff_device<=>LESSCHARSET, which should work also for > other non-latin1 locales. Hmm, I'm not sure roff_device is selected by LANG or by languages of manpages, that would be detected by manpath. For example, if foo.1 is found at /usr/share/man/ja/man1/foo.1, then roff_device is set to "nippon", regardless of LANG. If foo.1 found at /usr/share/man/man1/foo.1, then roff_device is set to default, not "nippon", even if LANG is "ja" because this manpages is written in ASCII. Anyway, I think your idea is much better than mine. > > +++ ./man-db-2.3.10/src/man.c Wed Sep 8 13:40:13 1999 > > @@ -150,6 +150,9 @@ > > > > +/* quick escape for i18n of man-db, Sep 8 1999 t.sano */ > > +static char *internal_locale; > > + > > as this is required by the use of the macro I already skipped, I'll skip > also this change. Ok. > > @@ -841,7 +843,12 @@ > > if (optind == argc) > > gripe_no_name (NULL); > > > > - putenv("LESSCHARSET=latin1"); > > +/* check the contents of "LANG" environment - Sep 8 1999 t.sano */ > > + if ( strncmp(internal_locale, "ja", 2) == 0 ) { > > + putenv("LESSCHARSET=ja"); > > + } else { > > + putenv("LESSCHARSET=latin1"); > > + } > > Here, the setting of LESSCHARSET was clearly unfair. > As a minimum, it should have checked the existing content of it. > I will add this, to permit overwrite of the default. > The entry in the table will be: > LANG roff_device LESSCHARSET > ja nippon ja > * NULL latin1 > it will be interesting to see how this will help other 2byte charset > and/or other langs like latin2 or greek ... It's ok. How about this configuration put in some configuration file, such as /etc/manpath.conf(?), instead of hard-coded in man-db? > > @@ -1346,7 +1353,15 @@ > > +/* Japanese hack: 1999/05/22: ukai@debian.or.jp */ > > +/* check the contents of "LANG" environment - Sep 8 1999 t.sano */ > > + if ( strncmp(internal_locale, "ja", 2) > > + == 0 ) { > > + filter = NROFF_JA; > > + } else { > > + filter = NROFF; > > + } > > + > > No more need for this also. Yes. > === few minutes later ==== > > Here it is; find attached the patch I used. > It works as expected, except that groff fails: > /usr/bin/groff:fatal error: invalid device `nippon' > man: command exited with status 768: /usr/bin/zsoelim '/tmp/zmanNHhOhD' | /usr/bin/groff -mandoc -Tnippon > > > Shouldn't we patch also groff ? This is because `-Tnippon' is supported only jgroff, japanese fork of groff. *sigh*. Yes, jgorff functionality should be also merged into groff but it has not yet done, because jgroff only supports Japanese not i18n'ed. Currently, jgroff in debian divert groff, so Japanese user will be happy to install jgroff instead of groff. Thanks, Fumitoshi UKAI
Information forwarded to debian-bugs-dist@lists.debian.org, Fabrizio Polacco <fpolacco@debian.org>
:
Bug#38107
; Package man-db
.
(full text, mbox, link).
Acknowledgement sent to Taketoshi Sano <xlj06203@nifty.ne.jp>
:
Extra info received and forwarded to list. Copy sent to Fabrizio Polacco <fpolacco@debian.org>
.
(full text, mbox, link).
Message #27 received at 38107@bugs.debian.org (full text, mbox, reply):
Hi, Thank you Fabrizio! I am excited to hear the man-db enables Japanese support. Wow! In <19990909055525.A545@none>, at Thu, 9 Sep 1999 05:55:25 +0300, on Re: Bug#38107: new patch for man-db japanese support, Fabrizio Polacco <fab@prosa.it> writes: fab> As I'm currently working to get 69j out, I'm applying it immediately fab> (otherwise it will surely slip below the pile :-( ). We are lucky then :) fab> As I had already planned to do with the previous patch, I indend to fab> modify it havily. I see. fab> > +/* Japanese hack: 1999/05/22: ukai@debian.or.jp */ fab> > +# define NROFF_JA "@nroff@ -Tnippon " fab> I will not apply that one. fab> Why? Because this new macro adds an argument which can already be fab> supplied though the argument -T . This patch would conflict with a fab> contemporary use of the option -T which I think should not be removed. fab> As the argument of the option -T is loaded in the var "roff_device", and fab> you're using the macro in dependance of the content of the ENV var LANG, fab> I will provide "nippon" as the default content of the var "roff_device", fab> in case of LANG value "ja" (in the future we could change this to be in fab> a table: LANG<=>roff_device<=>LESSCHARSET, which should work also for fab> other non-latin1 locales. I understand. I think your approach using a table is better solution. fab> > +/* quick escape for i18n of man-db, Sep 8 1999 t.sano */ fab> > +static char *internal_locale; fab> as this is required by the use of the macro I already skipped, I'll skip fab> also this change. Yes. fab> > - putenv("LESSCHARSET=latin1"); fab> > +/* check the contents of "LANG" environment - Sep 8 1999 t.sano */ fab> Here, the setting of LESSCHARSET was clearly unfair. fab> As a minimum, it should have checked the existing content of it. Yeah. this was too latin centric ;) I am thankful for your effort to fix this. fab> I will add this, to permit overwrite of the default. fab> The entry in the table will be: fab> LANG roff_device LESSCHARSET fab> ja nippon ja fab> * NULL latin1 fab> it will be interesting to see how this will help other 2byte charset fab> and/or other langs like latin2 or greek ... I hope this mechanism will help all Debian users. Maybe they can enhance man-db via this table if they needs. fab> > +/* Japanese hack: 1999/05/22: ukai@debian.or.jp */ fab> > +/* check the contents of "LANG" environment - Sep 8 1999 t.sano */ fab> No more need for this also. I see. fab> === few minutes later ==== fab> fab> Here it is; find attached the patch I used. I check this patch but I need to kill the setting the value 1 info "troff" variable like following to show the manpage on terminal. Without this, I see the postscript formated manpages without pager program. --- man.c.orig Fri Sep 10 00:00:51 1999 +++ man.c Fri Sep 10 06:19:26 1999 @@ -833,7 +833,7 @@ || ( lang_table[j].lang[0] == '*' )) { if ( ! roff_device ) { roff_device = lang_table[j].device; - troff = 1; +/* troff = 1; */ } if ( ! getenv( "LESSCHARSET") ) putenv( strappend ( 0 fab> It works as expected, except that groff fails: Do you see the pager controled text formatted manpages with setting 1 into troff ? fab> /usr/bin/groff:fatal error: invalid device `nippon' fab> man: command exited with status 768: /usr/bin/zsoelim '/tmp/zmanNHhOhD' | /usr/bin/groff -mandoc -Tnippon fab> fab> Shouldn't we patch also groff ? Yes. We should. Currently we have separate packages for japanese at groff (jgroff) and less (jless). They have been uploaded to and distributed from Debian,,, -- System Information Debian Release: potato Kernel Version: Linux yadon 2.2.9 #3 Thu Aug 26 21:48:46 JST 1999 i586 unknown Versions of the packages man-db depends on: ii libc6 2.1.2-1 GNU C Library: Shared libraries and timezone ii libdb2.6 2.6.4-6 The Berkeley database routines (run-time fil ii jgroff 0.100-2 GNU troff text-formatting system (Japanese E ^^^ (Provides virtual package groff) This is not right solution, and we (as unified Debian) should do integration of them. (to merge jgroff into groff, and jless into less) Since you took the effort to enhance your man-db to support japanese language, it will be more easy for the maintainer of jgroff to request the merge of his jgroff package. I will recommend him to do so. # I am afraid that he is very busy to do other things recently, # but if he can not work for this, ukai will work for this, I hope. # of course I shall do also, but please wait a while since I must # study the code of jgroff at first,,, Anyway, Thanks again. It's very nice thing to know Debian's official (integrated) man-db supports our Japanese manpages :) -- Taketoshi Sano: <sano@debian.org>,<sano@debian.or.jp>,<kgh12351@nifty.ne.jp>
Information forwarded to debian-bugs-dist@lists.debian.org, Fabrizio Polacco <fpolacco@debian.org>
:
Bug#38107
; Package man-db
.
(full text, mbox, link).
Acknowledgement sent to Taketoshi Sano <xlj06203@nifty.ne.jp>
:
Extra info received and forwarded to list. Copy sent to Fabrizio Polacco <fpolacco@debian.org>
.
(full text, mbox, link).
Message #32 received at 38107@bugs.debian.org (full text, mbox, reply):
Hi :) In <14295.61426.235619.29321F@lavender.ukai.org>, at Fri, 10 Sep 1999 02:35:46 +0900, on Re: Bug#38107: new patch for man-db japanese support, Fumitoshi UKAI <ukai@debian.or.jp> writes: ukai> Hmm, I'm not sure roff_device is selected by LANG or by languages ukai> of manpages, that would be detected by manpath. ukai> For example, if foo.1 is found at /usr/share/man/ja/man1/foo.1, then ukai> roff_device is set to "nippon", regardless of LANG. If foo.1 found ukai> at /usr/share/man/man1/foo.1, then roff_device is set to default, ukai> not "nippon", even if LANG is "ja" because this manpages is written ukai> in ASCII. I don't know which is better, but I can read well both of "man alien" (there is no ja manpages for alien), and "man beep" (beep is another sample lack of ja manpage) with "LANG=ja_JP.ujis". And we can set "-T" option to override the setting by LANG in this current approach, so I suppose that there may be no problem about this. and, if the lang is not set to "ja_xxx", the manpages under "ja/" tree would not be found by man-db, will it ? ukai> It's ok. How about this configuration put in some configuration ukai> file, such as /etc/manpath.conf(?), instead of hard-coded in man-db? even if this is possible, I think the hard-coded default is required for fail-safe when the configuration file has wrong table entries. of course, if the setting can be enhanced by editing the text file, it will be superior. ukai> > === few minutes later ==== ukai> > ukai> > Here it is; find attached the patch I used. ukai> > It works as expected, except that groff fails: ukai> > /usr/bin/groff:fatal error: invalid device `nippon' ukai> > man: command exited with status 768: /usr/bin/zsoelim '/tmp/zmanNHhOhD' | /usr/bin/groff -mandoc -Tnippon ukai> > ukai> > ukai> > Shouldn't we patch also groff ? ukai> ukai> This is because `-Tnippon' is supported only jgroff, japanese fork of ukai> groff. *sigh*. Yes, jgorff functionality should be also merged into ukai> groff but it has not yet done, because jgroff only supports Japanese ukai> not i18n'ed. Currently, jgroff in debian divert groff, so Japanese user ukai> will be happy to install jgroff instead of groff. I check the code for jgroff and groff. from the changelog for jgroff, it is based on groff_1.11a-2 of your package, Fabrizio. And, from the README.jp in jgroff_0.100-2, the author of jp patch for groff is Kitagawa Toshiyuki (tm-kita@kh.rim.or.jp), and the maintainer of jgroff, Yanagihara Yoshiaki (yochi@debian.or.jp, or yochi@debian.org) is member of the developers group for jgroff. I can't find the patch for groff. Maybe the patched tar archive is provided,,, (I don't know) Here is the result of small checking: [yadon] $ diff -qruN orig/groff-1.11a/ jp/jgroff-0.100/|wc 147 735 12594 [yadon] $ diff -ruN orig/groff-1.11a/ jp/jgroff-0.100/|wc 26934 96493 633776 These differences include unnecessory files (7 xxx.orig files are there in jgroff-0.100 code tree): [yadon] $ find jp/jgroff-0.100/ -name '*.orig'|xargs ls -s 15 jp/jgroff-0.100/Makefile.in.orig 59 jp/jgroff-0.100/configure.orig 15 jp/jgroff-0.100/groff/groff.cc.orig 8 jp/jgroff-0.100/groff/groff.man.orig 2 jp/jgroff-0.100/nroff/nroff.man.orig 3 jp/jgroff-0.100/tmac/Makefile.sub.orig 130 jp/jgroff-0.100/troff/input.cc.orig but reducing there extra files, still much differences there are. I don't know the reason why the maintainer of jgroff has not contact you. Can you contact him, Fabrizio ? I have found one interesting behaviour of man-db. [yadon] $ ls /usr/man/ja/man8/dpkg.8.gz /usr/man/ja/man8/dpkg.8.gz [yadon] $ ls /usr/man/man8/dpkg.8.gz ls: /usr/man/man8/dpkg.8.gz: No such file or directory [yadon] $ ls /usr/share/man/ja/man8/dpkg.8.gz ls: /usr/share/man/ja/man8/dpkg.8.gz: No such file or directory [yadon] $ ls /usr/share/man/man8/dpkg.8.gz /usr/share/man/man8/dpkg.8.gz Under these environment (default manpages go FHS, and ja manpages left fsstnd), the man-db find default page first, and ja pages can not be shown. here is the log of "man -d dpkg" (some lines are deleted): | real user = xxxx; effective user = 6 | | using /usr/bin/jless -i as pager | found mandatory man directory /usr/man | found mandatory man directory /usr/share/man | found mandatory man directory /usr/X11R6/man | found mandatory man directory /usr/local/man | found manpath map /bin --> /usr/share/man | found manpath map /usr/bin --> /usr/share/man | found manpath map /sbin --> /usr/share/man | found manpath map /usr/sbin --> /usr/share/man | found manpath map /usr/local/bin --> /usr/local/man | found manpath map /usr/local/sbin --> /usr/local/man | found manpath map /usr/X11R6/bin --> /usr/X11R6/man | found manpath map /usr/bin/X11 --> /usr/X11R6/man | found manpath map /usr/games --> /usr/share/man | found manpath map /opt/bin --> /opt/man | found manpath map /opt/sbin --> /opt/man | found global mandir /usr/man mapped to catdir /var/cache/man/fsstnd | found global mandir /usr/share/man mapped to catdir /var/cache/man | found global mandir /usr/local/man mapped to catdir /var/cache/man/local | found global mandir /usr/X11R6/man mapped to catdir /var/cache/man/X11R6 | | path directory /bin is in the config file | adding /usr/share/man to manpath | | path directory /usr/bin is in the config file | /usr/share/man is already in the manpath | | path directory /usr/bin/mh is not in the config file | and doesn't have man or MAN subdirectories | | path directory /usr/local/bin is in the config file | adding /usr/local/man to manpath | | path directory /usr/X11R6/bin is in the config file | adding /usr/X11R6/man to manpath | | path directory /usr/games is in the config file | /usr/share/man is already in the manpath | | path directory /usr/local/games is not in the config file | and doesn't have man or MAN subdirectories | | adding mandatory man directories | | adding /usr/man to manpath | /usr/share/man is already in the manpath | /usr/X11R6/man is already in the manpath | /usr/local/man is already in the manpath | add_nls_manpath(): adding /usr/share/man/ja | add_nls_manpath(): adding /usr/X11R6/man/ja | add_nls_manpath(): adding /usr/man/ja | adding /usr/share/man/ja to manpathlist | adding /usr/share/man to manpathlist | adding /usr/local/man to manpathlist | adding /usr/X11R6/man/ja to manpathlist | adding /usr/X11R6/man to manpathlist | adding /usr/man/ja to manpathlist | adding /usr/man to manpathlist | *manpath search path* = /usr/share/man/ja:/usr/share/man:/usr/local/man:/usr/X11R6/man/ja:/usr/X11R6/man:/usr/man/ja:/usr/man | regain_effective_privs() | searching in /usr/share/man/ja, section 1 | Failed to open /var/cache/man/ja/index.bt O_RDONLY | trying section 1 with globbing | globbing pattern: /usr/share/man/ja/man1/dpkg.1* | globbing pattern: /usr/share/man/ja/man1.Z/dpkg.1* | globbing pattern: /usr/share/man/ja/man1/dpkg.* | globbing pattern: /usr/share/man/ja/man1*/dpkg.1* | globbing pattern: /usr/share/man/ja/cat1/dpkg.1* | globbing pattern: /usr/share/man/ja/cat1.Z/dpkg.1* | globbing pattern: /usr/share/man/ja/cat1/dpkg.* | globbing pattern: /usr/share/man/ja/cat1*/dpkg.1* | searching in /usr/share/man, section 1 | Succeeded in opening /var/cache/man/index.bt O_RDONLY | searching in /usr/local/man, section 1 | Succeeded in opening /var/cache/man/local/index.bt O_RDONLY | searching in /usr/X11R6/man/ja, section 1 | Failed to open /var/cache/man/X11R6/ja/index.bt O_RDONLY | trying section 1 with globbing | globbing pattern: /usr/X11R6/man/ja/man1/dpkg.1* | globbing pattern: /usr/X11R6/man/ja/man1.Z/dpkg.1* | globbing pattern: /usr/X11R6/man/ja/man1/dpkg.* | globbing pattern: /usr/X11R6/man/ja/man1*/dpkg.1* | globbing pattern: /usr/X11R6/man/ja/cat1/dpkg.1* | globbing pattern: /usr/X11R6/man/ja/cat1.Z/dpkg.1* | globbing pattern: /usr/X11R6/man/ja/cat1/dpkg.* | globbing pattern: /usr/X11R6/man/ja/cat1*/dpkg.1* | searching in /usr/X11R6/man, section 1 | Succeeded in opening /var/cache/man/X11R6/index.bt O_RDONLY | searching in /usr/man/ja, section 1 | Failed to open /var/cache/man/fsstnd/ja/index.bt O_RDONLY | trying section 1 with globbing | globbing pattern: /usr/man/ja/man1/dpkg.1* | globbing pattern: /usr/man/ja/man1.Z/dpkg.1* | globbing pattern: /usr/man/ja/man1/dpkg.* | globbing pattern: /usr/man/ja/man1*/dpkg.1* | globbing pattern: /usr/man/ja/cat1/dpkg.1* | globbing pattern: /usr/man/ja/cat1.Z/dpkg.1* | globbing pattern: /usr/man/ja/cat1/dpkg.* | globbing pattern: /usr/man/ja/cat1*/dpkg.1* | searching in /usr/man, section 1 | Succeeded in opening /var/cache/man/fsstnd/index.bt O_RDONLY | searching in /usr/share/man/ja, section n | trying section n with globbing | globbing pattern: /usr/share/man/ja/mann/dpkg.n* | globbing pattern: /usr/share/man/ja/mann.Z/dpkg.n* | globbing pattern: /usr/share/man/ja/mann/dpkg.* | globbing pattern: /usr/share/man/ja/mann*/dpkg.n* | globbing pattern: /usr/share/man/ja/catn/dpkg.n* | globbing pattern: /usr/share/man/ja/catn.Z/dpkg.n* | globbing pattern: /usr/share/man/ja/catn/dpkg.* | globbing pattern: /usr/share/man/ja/catn*/dpkg.n* | searching in /usr/share/man, section n | searching in /usr/local/man, section n | searching in /usr/X11R6/man/ja, section n | trying section n with globbing | globbing pattern: /usr/X11R6/man/ja/mann/dpkg.n* | globbing pattern: /usr/X11R6/man/ja/mann.Z/dpkg.n* | globbing pattern: /usr/X11R6/man/ja/mann/dpkg.* | globbing pattern: /usr/X11R6/man/ja/mann*/dpkg.n* | globbing pattern: /usr/X11R6/man/ja/catn/dpkg.n* | globbing pattern: /usr/X11R6/man/ja/catn.Z/dpkg.n* | globbing pattern: /usr/X11R6/man/ja/catn/dpkg.* | globbing pattern: /usr/X11R6/man/ja/catn*/dpkg.n* | searching in /usr/X11R6/man, section n | searching in /usr/man/ja, section n | trying section n with globbing | globbing pattern: /usr/man/ja/mann/dpkg.n* | globbing pattern: /usr/man/ja/mann.Z/dpkg.n* | globbing pattern: /usr/man/ja/mann/dpkg.* | globbing pattern: /usr/man/ja/mann*/dpkg.n* | globbing pattern: /usr/man/ja/catn/dpkg.n* | globbing pattern: /usr/man/ja/catn.Z/dpkg.n* | globbing pattern: /usr/man/ja/catn/dpkg.* | globbing pattern: /usr/man/ja/catn*/dpkg.n* | searching in /usr/man, section n | searching in /usr/share/man/ja, section l | trying section l with globbing | globbing pattern: /usr/share/man/ja/manl/dpkg.l* | globbing pattern: /usr/share/man/ja/manl.Z/dpkg.l* | globbing pattern: /usr/share/man/ja/manl/dpkg.* | globbing pattern: /usr/share/man/ja/manl*/dpkg.l* | globbing pattern: /usr/share/man/ja/catl/dpkg.l* | globbing pattern: /usr/share/man/ja/catl.Z/dpkg.l* | globbing pattern: /usr/share/man/ja/catl/dpkg.* | globbing pattern: /usr/share/man/ja/catl*/dpkg.l* | searching in /usr/share/man, section l | searching in /usr/local/man, section l | searching in /usr/X11R6/man/ja, section l | trying section l with globbing | globbing pattern: /usr/X11R6/man/ja/manl/dpkg.l* | globbing pattern: /usr/X11R6/man/ja/manl.Z/dpkg.l* | globbing pattern: /usr/X11R6/man/ja/manl/dpkg.* | globbing pattern: /usr/X11R6/man/ja/manl*/dpkg.l* | globbing pattern: /usr/X11R6/man/ja/catl/dpkg.l* | globbing pattern: /usr/X11R6/man/ja/catl.Z/dpkg.l* | globbing pattern: /usr/X11R6/man/ja/catl/dpkg.* | globbing pattern: /usr/X11R6/man/ja/catl*/dpkg.l* | searching in /usr/X11R6/man, section l | searching in /usr/man/ja, section l | trying section l with globbing | globbing pattern: /usr/man/ja/manl/dpkg.l* | globbing pattern: /usr/man/ja/manl.Z/dpkg.l* | globbing pattern: /usr/man/ja/manl/dpkg.* | globbing pattern: /usr/man/ja/manl*/dpkg.l* | globbing pattern: /usr/man/ja/catl/dpkg.l* | globbing pattern: /usr/man/ja/catl.Z/dpkg.l* | globbing pattern: /usr/man/ja/catl/dpkg.* | globbing pattern: /usr/man/ja/catl*/dpkg.l* | searching in /usr/man, section l | searching in /usr/share/man/ja, section 8 | trying section 8 with globbing | globbing pattern: /usr/share/man/ja/man8/dpkg.8* | globbing pattern: /usr/share/man/ja/man8.Z/dpkg.8* | globbing pattern: /usr/share/man/ja/man8/dpkg.* | globbing pattern: /usr/share/man/ja/man8*/dpkg.8* | globbing pattern: /usr/share/man/ja/cat8/dpkg.8* | globbing pattern: /usr/share/man/ja/cat8.Z/dpkg.8* | globbing pattern: /usr/share/man/ja/cat8/dpkg.* | globbing pattern: /usr/share/man/ja/cat8*/dpkg.8* | searching in /usr/share/man, section 8 | trying a db located file. | sec. ext: 8 | section: 8 | comp. ext: gz | id: A | st_mtime 932834096 | pointer: - | whatis: a medium-level package manager for Debian GNU/Linux | | Checking physical location: /usr/share/man/man8/dpkg.8.gz | | ult_src: File /usr/share/man/man8/dpkg.8.gz | drop_effective_privs() | regain_effective_privs() | The following command done with dropped privs | /bin/gzip -dc /usr/share/man/man8/dpkg.8.gz > /tmp/zmanHSNHvf | found ultimate source file /usr/share/man/man8/dpkg.8.gz | chdir /usr/share/man | pre-processors `' from default | is_newer: a=/usr/share/man/man8/dpkg.8.gz, b=/usr/share/man/cat8/dpkg.8.gz (-2) | is_newer: a=/usr/share/man/man8/dpkg.8.gz, b=/var/cache/man/cat8/dpkg.8.gz (0) | format: 0, save_cat: 1, found: 1 | drop_effective_privs() | | trying command: /bin/gzip -dc '/var/cache/man/cat8/dpkg.8.gz' | { export MAN_PN LESS; MAN_PN='dpkg(8)'; LESS="$LESS\$-Pm\:\$ix8mPm Manual page $MAN_PN ?ltline %lt?L/%L.:byte %bB?s/%s..?e (END):?pB %pB\\%.."; /usr/bin/jless -i ; } | regain_effective_privs() | drop_effective_privs() | remove("/tmp/zmanHSNHvf") | regain_effective_privs() | free_hashtab: 7 entries, 7 (100%) unique | | Found 1 man pages I wonder if this is related to Wichert's problem,,, -- Taketoshi Sano: <sano@debian.org>,<sano@debian.or.jp>,<kgh12351@nifty.ne.jp>
Information forwarded to debian-bugs-dist@lists.debian.org, Fabrizio Polacco <fpolacco@debian.org>
:
Bug#38107
; Package man-db
.
(full text, mbox, link).
Acknowledgement sent to Fabrizio Polacco <fab@prosa.it>
:
Extra info received and forwarded to list. Copy sent to Fabrizio Polacco <fpolacco@debian.org>
.
(full text, mbox, link).
Message #37 received at 38107@bugs.debian.org (full text, mbox, reply):
On Fri, Sep 10, 1999 at 02:35:46AM +0900, Fumitoshi UKAI wrote: > > Hmm, I'm not sure roff_device is selected by LANG or by languages > of manpages, that would be detected by manpath. > For example, if foo.1 is found at /usr/share/man/ja/man1/foo.1, then > roff_device is set to "nippon", regardless of LANG. If foo.1 found > at /usr/share/man/man1/foo.1, then roff_device is set to default, > not "nippon", even if LANG is "ja" because this manpages is written > in ASCII. Yeah, I see ... The problem here is that we are using the roff_device for specifying the charset. The roff_device is the renderer of the page. Is not that the roff_device is "latin1" because the page is written in ascii, but because the page will be displayed on an ascii device. The same page can be rendered in postscript (which is the default) and displayed on a postscript dsplay or printer. How do you output postscript from a "ja" manpage? OIMHO the charset should be written inside the manpage itself. fab -- | fab@pukki.ntc.nokia.com fpolacco@prosa.it fpolacco@debian.org | 6F7267F5 fingerprint 57 16 C4 ED C9 86 40 7B 1A 69 A1 66 EC FB D2 5E | fabrizio.polacco@nokia.com gsm: +358 (0)40 707 2468
Information forwarded to debian-bugs-dist@lists.debian.org, Fabrizio Polacco <fpolacco@debian.org>
:
Bug#38107
; Package man-db
.
(full text, mbox, link).
Acknowledgement sent to Fumitoshi UKAI <ukai@debian.or.jp>
:
Extra info received and forwarded to list. Copy sent to Fabrizio Polacco <fpolacco@debian.org>
.
(full text, mbox, link).
Message #42 received at 38107@bugs.debian.org (full text, mbox, reply):
At Fri, 10 Sep 1999 07:00:45 +0300, Fabrizio Polacco <fab@prosa.it> wrote: > > Hmm, I'm not sure roff_device is selected by LANG or by languages > > of manpages, that would be detected by manpath. > > For example, if foo.1 is found at /usr/share/man/ja/man1/foo.1, then > > roff_device is set to "nippon", regardless of LANG. If foo.1 found > > at /usr/share/man/man1/foo.1, then roff_device is set to default, > > not "nippon", even if LANG is "ja" because this manpages is written > > in ASCII. > > Yeah, I see ... > The problem here is that we are using the roff_device for specifying the > charset. > The roff_device is the renderer of the page. > Is not that the roff_device is "latin1" because the page is written in > ascii, but because the page will be displayed on an ascii device. > The same page can be rendered in postscript (which is the default) and > displayed on a postscript dsplay or printer. Ah, I understand. The roff_device is used to select output device. It should not selected by charset of manpages as I said. Sorry. > How do you output postscript from a "ja" manpage? Without japanese patch for man-db, if jgroff is installed, `man -t foo > foo.ps' will generate postscript from "ja" manpage. > OIMHO the charset should be written inside the manpage itself. Agree. Thanks, Fumitoshi UKAI
Information forwarded to debian-bugs-dist@lists.debian.org, Fabrizio Polacco <fpolacco@debian.org>
:
Bug#38107
; Package man-db
.
(full text, mbox, link).
Acknowledgement sent to Fabrizio Polacco <fab@prosa.it>
:
Extra info received and forwarded to list. Copy sent to Fabrizio Polacco <fpolacco@debian.org>
.
(full text, mbox, link).
Message #47 received at 38107@bugs.debian.org (full text, mbox, reply):
On Fri, Sep 10, 1999 at 03:46:57PM +0900, Fumitoshi UKAI wrote: > > > How do you output postscript from a "ja" manpage? > > Without japanese patch for man-db, if jgroff is installed, > `man -t foo > foo.ps' will generate postscript from "ja" manpage. And that output is good, isn't it? If so, you don't want to lose that! So adding -Tnippon by default we lose something, isn't it? So maybe what you want is to have -Tnippon ONLY when -Tascii or -Tlatin1 is used, isn't it? If so, I have to think of a different solution. fab -- | fab@pukki.ntc.nokia.com fpolacco@prosa.it fpolacco@debian.org | 6F7267F5 fingerprint 57 16 C4 ED C9 86 40 7B 1A 69 A1 66 EC FB D2 5E | fabrizio.polacco@nokia.com gsm: +358 (0)40 707 2468
Information forwarded to debian-bugs-dist@lists.debian.org, Fabrizio Polacco <fpolacco@debian.org>
:
Bug#38107
; Package man-db
.
(full text, mbox, link).
Acknowledgement sent to Fumitoshi UKAI <ukai@debian.or.jp>
:
Extra info received and forwarded to list. Copy sent to Fabrizio Polacco <fpolacco@debian.org>
.
(full text, mbox, link).
Message #52 received at 38107@bugs.debian.org (full text, mbox, reply):
At Fri, 10 Sep 1999 09:37:54 +0300, Fabrizio Polacco <fab@prosa.it> wrote: > > > How do you output postscript from a "ja" manpage? > > > > Without japanese patch for man-db, if jgroff is installed, > > `man -t foo > foo.ps' will generate postscript from "ja" manpage. > > And that output is good, isn't it? > If so, you don't want to lose that! > So adding -Tnippon by default we lose something, isn't it? > So maybe what you want is to have -Tnippon ONLY when -Tascii or -Tlatin1 > is used, isn't it? I understand what you said. I had some misunderstanding about it. Regards, Fumitoshi UKAI
Information forwarded to debian-bugs-dist@lists.debian.org, Fabrizio Polacco <fpolacco@debian.org>
:
Bug#38107
; Package man-db
.
(full text, mbox, link).
Acknowledgement sent to Fabrizio Polacco <fab@prosa.it>
:
Extra info received and forwarded to list. Copy sent to Fabrizio Polacco <fpolacco@debian.org>
.
(full text, mbox, link).
Message #57 received at 38107@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
[crossposted to debian-i18n because I need people from other charsets to compelte the table in the patch and try if and how it works for their languages/charsets.] Here is an attempt to have man-db display pages written in languages other than latin1 to show correctly using their own charset. Apply the patch to man-db -69i sources and recompile. You don't need to make a new package, or to change your machine: issue debian/rules debug (need sudo installed) and you'll get the new binary as src/man with the correct permissions. If you want to debug it, use sudo gdb src/man to get it working, as gdb croacks on setgid binaries. To update the table, put a new line _before_ the one with the asterisc; put yor LANG value in the first column, the driver you use for groff (when you call man -t device ...) in the second, and the value of LESSCHARSET env var in the third. with that, if man selects to display a page under .../man/ja/man1/ (which is driven by LANG), it will set the values in the corresponding line of the table, and man foo should work as if you issued LESSCHARSET=ja man -Tnippon foo On Fri, Sep 10, 1999 at 03:46:57PM +0900, Fumitoshi UKAI wrote: > At Fri, 10 Sep 1999 07:00:45 +0300, Fabrizio Polacco <fab@prosa.it> wrote: > > > The problem here is that we are using the roff_device for specifying the > > charset. > > The roff_device is the renderer of the page. > > Is not that the roff_device is "latin1" because the page is written in > > ascii, but because the page will be displayed on an ascii device. > > The same page can be rendered in postscript (which is the default) and > > displayed on a postscript dsplay or printer. > > Ah, I understand. The roff_device is used to select output device. > It should not selected by charset of manpages as I said. Sorry. > So, here is a new patch, completely different from the previous. It uses the same table, but that is used directly while creating the roff command line, and can be overritten by options and ENV VARS. Please try it for japanese pages. It should use nippon device for pages found on /man/ja/man?/ path, and latin1 for the /man/man?/ path, indipendently of the LANG var. The problem is: will this approach work also for other charsets, like latin2, greek, cyrillic or korean? Do they have a different groff driver? As you see, I need info to fill in the table. fab -- | fab@pukki.ntc.nokia.com fpolacco@prosa.it fpolacco@debian.org | 6F7267F5 fingerprint 57 16 C4 ED C9 86 40 7B 1A 69 A1 66 EC FB D2 5E | fabrizio.polacco@nokia.com gsm: +358 (0)40 707 2468
[man.c.diff3 (text/plain, attachment)]
Information forwarded to debian-bugs-dist@lists.debian.org, Fabrizio Polacco <fpolacco@debian.org>
:
Bug#38107
; Package man-db
.
(full text, mbox, link).
Acknowledgement sent to Changwoo Ryu <cwryu@debian.org>
:
Extra info received and forwarded to list. Copy sent to Fabrizio Polacco <fpolacco@debian.org>
.
(full text, mbox, link).
Message #62 received at 38107@bugs.debian.org (full text, mbox, reply):
Fabrizio Polacco <fab@prosa.it> writes: > To update the table, put a new line _before_ the one with the asterisc; > put yor LANG value in the first column, the driver you use for groff > (when you call man -t device ...) in the second, and the value of > LESSCHARSET env var in the third. > with that, if man selects to display a page under .../man/ja/man1/ > (which is driven by LANG), it will set the values in the corresponding > line of the table, and > man foo > should work as if you issued > LESSCHARSET=ja man -Tnippon foo [..snipped..] > The problem is: will this approach work also for other charsets, like > latin2, greek, cyrillic or korean? > Do they have a different groff driver? There's no Korean driver, unfortunately. No body has worked on the Korean driver, AFAIK. There's no problem to see a Korean manpages in hanterm with LESSCHARSET=latin1; but we can't print Korean man pages. But this solution looks good. I believe it's applicable to Korean. To apply this solution to Korean, Korean native driver should be made first. -- Changwoo Ryu
Information forwarded to debian-bugs-dist@lists.debian.org, Fabrizio Polacco <fpolacco@debian.org>
:
Bug#38107
; Package man-db
.
(full text, mbox, link).
Acknowledgement sent to Fumitoshi UKAI <ukai@debian.or.jp>
:
Extra info received and forwarded to list. Copy sent to Fabrizio Polacco <fpolacco@debian.org>
.
(full text, mbox, link).
Message #67 received at 38107@bugs.debian.org (full text, mbox, reply):
Hi, Fabrizio. At Tue, 14 Sep 1999 08:05:03 +0300, Fabrizio Polacco <fab@prosa.it> wrote: > [crossposted to debian-i18n because I need people from other charsets to > compelte the table in the patch and try if and how it works for their > languages/charsets.] > > Here is an attempt to have man-db display pages written in languages > other than latin1 to show correctly using their own charset. > Apply the patch to man-db -69i sources and recompile. > You don't need to make a new package, or to change your machine: issue > debian/rules debug (need sudo installed) and you'll get the new binary > as src/man with the correct permissions. > If you want to debug it, use sudo gdb src/man to get it working, as > gdb croacks on setgid binaries. Hmm, As I checked your patch, it does not work correctly. The following for() loop never run, because at first j = 0, then j && lang_table[j].lang will be false. so it would never check lang_table. > + int j; > + for ( j=0; j && lang_table[j].lang; j++ ) { > + if (( strncmp( lang_table[j].lang, lang > + , strlen( lang_table[j].lang)) == 0 ) > + || ( lang_table[j].lang[0] == '*' )) { > + roff_device = lang_table[j].device; > + troff = 1; > + putenv( strappend ( 0 > + ,"LESSCHARSET=" > + , lang_table[j].charset > + , 0)); > + } > + j= -1; > + } I'm not sure what you intend here exactly, but I think it should be the followings, shouldn't it? int j; for ( j=0; lang_table[j].lang; j++ ) { if (( strncmp( lang_table[j].lang, lang , strlen( lang_table[j].lang)) == 0 ) || ( lang_table[j].lang[0] == '*' )) { roff_device = lang_table[j].device; troff = 1; putenv( strappend ( 0 ,"LESSCHARSET=" , lang_table[j].charset , 0)); break; } } With this fix, it works fine for LANG=ja. Thanks! Regards, Fumitoshi UKAI
Information forwarded to debian-bugs-dist@lists.debian.org, Fabrizio Polacco <fpolacco@debian.org>
:
Bug#38107
; Package man-db
.
(full text, mbox, link).
Acknowledgement sent to Fabrizio Polacco <fab@prosa.it>
:
Extra info received and forwarded to list. Copy sent to Fabrizio Polacco <fpolacco@debian.org>
.
(full text, mbox, link).
Message #72 received at 38107@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
On Wed, Sep 15, 1999 at 02:16:16AM +0900, Fumitoshi UKAI wrote: > > Hmm, As I checked your patch, it does not work correctly. oh, oh, wrong file attached (hummm)... sorry for the noise </shame>. fab -- | fab@pukki.ntc.nokia.com fpolacco@prosa.it fpolacco@debian.org | 6F7267F5 fingerprint 57 16 C4 ED C9 86 40 7B 1A 69 A1 66 EC FB D2 5E | fabrizio.polacco@nokia.com gsm: +358 (0)40 707 2468
[man.c.diff4 (text/plain, attachment)]
Information forwarded to debian-bugs-dist@lists.debian.org, Fabrizio Polacco <fpolacco@debian.org>
:
Bug#38107
; Package man-db
.
(full text, mbox, link).
Acknowledgement sent to Taketoshi Sano <xlj06203@nifty.ne.jp>
:
Extra info received and forwarded to list. Copy sent to Fabrizio Polacco <fpolacco@debian.org>
.
(full text, mbox, link).
Message #77 received at 38107@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Hi. ukai> Hmm, As I checked your patch, it does not work correctly. ukai> The following for() loop never run, because at first j = 0, then ukai> j && lang_table[j].lang will be false. so it would never check lang_table. I also noticed using your (Fabrizio's) patch, man does segmatation fault when it is given a non-existing man page. You can check it by "man zzz". This is caused by "if ( ! *lang ) {" at line 1327. lang has type of (char *), so this should be "if ( ! lang ) {", I think. ukai> I'm not sure what you intend here exactly, but I think it should be ukai> the followings, shouldn't it? ukai> ukai> int j; ukai> for ( j=0; lang_table[j].lang; j++ ) { ukai> if (( strncmp( lang_table[j].lang, lang ukai> , strlen( lang_table[j].lang)) == 0 ) ukai> || ( lang_table[j].lang[0] == '*' )) { ukai> roff_device = lang_table[j].device; ukai> troff = 1; ukai> putenv( strappend ( 0 ukai> ,"LESSCHARSET=" ukai> , lang_table[j].charset ukai> , 0)); ukai> break; ukai> } ukai> } ukai> ukai> With this fix, it works fine for LANG=ja. Thanks! When I use man-db without the change above (! *lang -> ! lang), manpages are displayed on "LANG=C" with pager. But on "LANG=ja_JP.ujis", manpages are displayed without pager. Here are the output from ps axwf: (for "LANG=C man ls" :) 3802 p2 T 0:00 \_ man ls 3805 p2 T 0:00 | \_ sh -c /bin/gzip -dc '/var/cache/man/fsstnd/cat1/ls.1.gz' | { export MAN_PN LESS; MAN_PN='ls(1)'; LESS="$LESS\$-Pm\:\$ix8mPm Manual p 3806 p2 T 0:00 | \_ /bin/gzip -dc /var/cache/man/fsstnd/cat1/ls.1.gz 3807 p2 T 0:00 | \_ sh -c /bin/gzip -dc '/var/cache/man/fsstnd/cat1/ls.1.gz' | { export MAN_PN LESS; MAN_PN='ls(1)'; LESS="$LESS\$-Pm\:\$ix8mPm Manu 3808 p2 T 0:00 | \_ /usr/bin/jless -i 3816 p2 R 0:00 \_ ps xwf (for "LANG=ja_JP.ujis man ls" :) 777 p2 S 0:01 -bash 3787 p2 T 0:00 \_ man ls 3790 p2 T 0:00 | \_ sh -c /usr/bin/zsoelim '/tmp/zman03787aaa' | /usr/bin/groff -mandoc -Tnippon 3791 p2 T 0:00 | \_ /usr/bin/zsoelim /tmp/zman03787aaa 3792 p2 T 0:00 | \_ /usr/bin/groff -mandoc -Tnippon 3793 p2 T 0:00 | \_ troff -msafer -mandoc -Tnippon 3794 p2 T 0:00 | \_ grotty 3800 p2 R 0:00 \_ ps xwf 3801 p2 R 0:00 \_ -bash and using the change of "[! *lang] -> [! lang]", the manpages are displayed without pager in both case (either "LANG=C" or "LANG=ja_JP.ujis") I find that the line "if (troff) {" at 1790 prevent to use pager when troff is true. And the comment begining at line 1046 say case 'T': /* @@@ traditional nroff knows -T, troff does not (gets ignored). All incarnations of groff know it. Why does -T imply -t? */ I wish to know "Why does -T imply -t?" Is it required ? I am not satisfied if manpages are always shown without pager. By the way, following this comment, there are lines below. /* as this is an optional argument */ roff_device = (optarg ? optarg : "ps"); troff = 1; break; But there is a line at 478: static const char args[] = "7DlM:P:S:adfhkVum:p:we:L:cr:"; and a line at 466: static const char args[] = "7DlM:P:S:adfhkVum:p:tT:we:L:Zcr:X"; Both of these two lines have "T:" as a optstring for getopt_long (at 983), but manpage of getopt_long say: optstring is a string containing the legitimate option characters. If such a character is followed by a colon, the option requires an argument, so getopt places a pointer to the following text in the same argv-element, or the text of the following argv-element, in optarg. Two colons mean an option takes an optional arg; if there is text in the current argv-element, it is returned in optarg, otherwise optarg is set to zero. This is a GNU extension. so if "-T" option takes an optional arg, then args[] should have "T::" as a part of it. (at least, any GNU system) In fact, you can check it by "man -T ls". This output the error message "What manual page do you want?". Again, we can use "-t" explicitly when we needs it, I don't think it is necessary to imply "-t" by "-T", and let "-t" be default is not comfortable for me at all. I attach the patch against original 2.3.10-69i and against the previous patch from Fabrizio. Your implementation is cool approach, Fabrizio. But manpages are important for many novice users and even trifle things such that man-db does not use pager can easily be obstacle for us. Please change the behavior of man-db to use pager as default. Thanks. -- Taketoshi Sano: <sano@debian.org>,<sano@debian.or.jp>,<kgh12351@nifty.ne.jp>
[diff.last (text/plain, attachment)]
[diff.fab (text/plain, attachment)]
Information forwarded to debian-bugs-dist@lists.debian.org, Fabrizio Polacco <fpolacco@debian.org>
:
Bug#38107
; Package man-db
.
(full text, mbox, link).
Acknowledgement sent to Taketoshi Sano <xlj06203@nifty.ne.jp>
:
Extra info received and forwarded to list. Copy sent to Fabrizio Polacco <fpolacco@debian.org>
.
(full text, mbox, link).
Message #82 received at 38107@bugs.debian.org (full text, mbox, reply):
Ah, I have mistake. In <19990915181233Q.xlj06203@xlj06203.nifty.ne.jp>, at Date: Wed, 15 Sep 1999 18:12:33 +0900, Taketoshi Sano <xlj06203@nifty.ne.jp> writes: > By the way, following this comment, there are lines below. > > /* as this is an optional argument */ > roff_device = (optarg ? optarg : "ps"); > troff = 1; > break; > > But there is a line at 478: > > static const char args[] = "7DlM:P:S:adfhkVum:p:we:L:cr:"; > > and a line at 466: > > static const char args[] = "7DlM:P:S:adfhkVum:p:tT:we:L:Zcr:X"; > > Both of these two lines have "T:" as a optstring for getopt_long (at 983), Easily noticable mistake. the line at 478 does not include "T:". Sorry. But in this case, the line effective is at 466 only, so the change of "T:" into "T::" is still valid. (at line 466 only, of course) Maybe new macro definition is required for getopt_long effective with "::" optstring. P.S. I found that manpages for man-db translated into Japanese are included man-db-ja (JP Package). They are given from JM Project (http://www.linux.or.jp/jman/ written in Japanese), and can be used freely. Maybe the translation is not current newest, or they may have some difference in detail, but evenif so, I think it will be useful for novice user who requre Japanese manpages for man-db package. Can you include them ? P.S.2 I had not recieved the 2nd patch from Fabrizio, and I have not tested it yet. I will check it at (maybe) tonight. -- Taketoshi Sano: <sano@debian.org>,<sano@debian.or.jp>,<kgh12351@nifty.ne.jp>
Information forwarded to debian-bugs-dist@lists.debian.org, Fabrizio Polacco <fpolacco@debian.org>
:
Bug#38107
; Package man-db
.
(full text, mbox, link).
Acknowledgement sent to Fumitoshi UKAI <ukai@debian.or.jp>
:
Extra info received and forwarded to list. Copy sent to Fabrizio Polacco <fpolacco@debian.org>
.
(full text, mbox, link).
Message #87 received at 38107@bugs.debian.org (full text, mbox, reply):
Hi, At Wed, 15 Sep 1999 09:04:38 +0300, Fabrizio Polacco <fab@prosa.it> wrote: > > Hmm, As I checked your patch, it does not work correctly. > > oh, oh, wrong file attached (hummm)... > sorry for the noise </shame>. I'm afraid it also does not work correctly. > + int j; > + for ( j=0; lang_table[j].lang; j++ ) { > + if (( strncmp( lang_table[j].lang, lang > + , strlen( lang_table[j].lang)) == 0 ) > + || ( lang_table[j].lang[0] == '*' )) { > + roff_device = lang_table[j].device; > + troff = 1; I think this `troff = 1;' should be removed, because when troff = 1, a man page will not be showed using pager, but simply output to stdout. (see man.c:display() around 1790 lines) Without this `troff = 1', it seems works fine for me. Why do you `troff = 1' here? > + putenv( strappend ( 0 > + ,"LESSCHARSET=" > + , lang_table[j].charset > + , 0)); > + j = sizeof(lang_table)/sizeof(struct lt) - 2; > + } > + } > + } Thanks Fumitoshi UKAI
Information forwarded to debian-bugs-dist@lists.debian.org, Fabrizio Polacco <fpolacco@debian.org>
:
Bug#38107
; Package man-db
.
(full text, mbox, link).
Acknowledgement sent to Fabrizio Polacco <fab@prosa.it>
:
Extra info received and forwarded to list. Copy sent to Fabrizio Polacco <fpolacco@debian.org>
.
(full text, mbox, link).
Message #92 received at 38107@bugs.debian.org (full text, mbox, reply):
On Mon, Sep 20, 1999 at 05:22:36AM +0900, Fumitoshi UKAI wrote: > > I'm afraid it also does not work correctly. > > > + troff = 1; > > I think this `troff = 1;' should be removed, because when troff = 1, > a man page will not be showed using pager, but simply output to stdout. Yeah, you're right. I was simply assuming that when getting the screen full of garbage .. that's the ja manpage, so it was correct :-) OK just remove that line, or put zero in line 1340 (humm ... my source ...) :-) I want to get out with this version, as it has a lot of fixes. Any other language can test it? I've tested with hungarian, but it works good also with latin1, so ... One question concern me: how do you switch set of characters in your console/xterm ? I mean if the page is in "ja" it displays in japanes, else in english. But you need to switch also the charset, isn't it? In any case, this will not work untill we will have merged jgroff with groff and jless with less. fab -- | fab@pukki.ntc.nokia.com fpolacco@prosa.it fpolacco@debian.org | 6F7267F5 fingerprint 57 16 C4 ED C9 86 40 7B 1A 69 A1 66 EC FB D2 5E | fabrizio.polacco@nokia.com gsm: +358 (0)40 707 2468
Information forwarded to debian-bugs-dist@lists.debian.org, Fabrizio Polacco <fpolacco@debian.org>
:
Bug#38107
; Package man-db
.
(full text, mbox, link).
Acknowledgement sent to Fumitoshi UKAI <ukai@debian.or.jp>
:
Extra info received and forwarded to list. Copy sent to Fabrizio Polacco <fpolacco@debian.org>
.
(full text, mbox, link).
Message #97 received at 38107@bugs.debian.org (full text, mbox, reply):
At Mon, 20 Sep 1999 16:19:27 +0300, Fabrizio Polacco <fab@prosa.it> wrote: > > On Mon, Sep 20, 1999 at 05:22:36AM +0900, Fumitoshi UKAI wrote: > > > > I'm afraid it also does not work correctly. > > > > > + troff = 1; > > > > I think this `troff = 1;' should be removed, because when troff = 1, > > a man page will not be showed using pager, but simply output to stdout. > > Yeah, you're right. > I was simply assuming that when getting the screen full of garbage .. > that's the ja manpage, so it was correct :-) > > OK just remove that line, or put zero in line 1340 (humm ... my source > ...) > > :-) OK :-) > I want to get out with this version, as it has a lot of fixes. > Any other language can test it? > I've tested with hungarian, but it works good also with latin1, so ... > > One question concern me: how do you switch set of characters in your > console/xterm ? I mean if the page is in "ja" it displays in japanes, > else in english. But you need to switch also the charset, isn't it? Yes, it is necessary to run special program to display Japanese characters. On console, use kon2 w/ konfont to display in Japanese, because linux console itself doesn't have ability to display Japanese character. On X window system, use kterm or krxvt (in rxvt-ml package) instead of xterm (unfortunately eterm is compiled disabled KANJI support... *sigh*) Japanese user runs these programs (and set LANG to ja*) if he or she want to read Japanese document/manual pages. > In any case, this will not work untill we will have merged jgroff with > groff and jless with less. Yes. I think it is difficult to merge jgroff with groff. However, we can easily merge jless with less, because jless has compatibility with less. Unless LESSCHARSET=japanse-* or something, jless runs as well as less. Regards, Fumitoshi UKAI
Reply sent to Fabrizio Polacco <fpolacco@debian.org>
:
You have taken responsibility.
(full text, mbox, link).
Notification sent to Fumitoshi UKAI <ukai@debian.or.jp>
:
Bug acknowledged by developer.
(full text, mbox, link).
Message #102 received at 38107-close@bugs.debian.org (full text, mbox, reply):
We believe that the bug you reported is fixed in the latest version of man-db, which has been installed in the Debian FTP archive: man-db_2.3.10-69j_i386.deb to dists/potato/main/binary-i386/doc/man-db_2.3.10-69j.deb replacing man-db_2.3.10-69i.deb man-db_2.3.10-69j.diff.gz to dists/potato/main/source/doc/man-db_2.3.10-69j.diff.gz replacing man-db_2.3.10-69i.diff.gz man-db_2.3.10-69j.dsc to dists/potato/main/source/doc/man-db_2.3.10-69j.dsc replacing man-db_2.3.10-69i.dsc Note that this package is not part of the released stable Debian distribution. It may have dependencies on other unreleased software, or other instabilities. Please take care if you wish to install it. The update will eventually make its way into the next released Debian distribution. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to 38107@bugs.debian.org, and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Fabrizio Polacco <fpolacco@debian.org> (supplier of updated man-db package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing ftpmaster@debian.org) -----BEGIN PGP SIGNED MESSAGE----- Format: 1.6 Date: Wed, 9 Jun 1999 10:37:29 +0300 Source: man-db Binary: man-db Architecture: source i386 Version: 2.3.10-69j Distribution: unstable Urgency: low Maintainer: Fabrizio Polacco <fpolacco@debian.org> Description: man-db - Display the on-line manual. Closes: 20949 21016 21240 23239 23267 24267 24604 24691 25825 26002 26038 26077 26222 26465 27858 32036 32759 33679 34643 35336 38107 39039 39281 39646 39687 41205 41715 41748 43845 45979 Changes: man-db (2.3.10-69j) unstable; urgency=low . * made compliant to policy 3.0.1 * Gone through a quick check of all bugs (61!): Problems fixed in previous releases, but never closed: closes: #35336, #20949, #21016, #21240, #23239, #23267, #24267, #24604, #24691, #25825, #26002, #26038, #26077, #26222, #26465, #27858, #32036, #32759, #33679, #34643, #41748. * removed setuid permissions from file in tarball, as postinst handle them properly. Closes #32213. * changed the copyright file to point out that the author has passed maintainership. Also changed location of his ftp site. closes #41737, #30153. * found (and fixed) nasty bug in reading config file that segfaulted on too large files. Now stops reading and procede. * Added japanese support. Thanx to Taketoshi Sano <sano@debian.org> and Fumitoshi UKAI <ukai@debian.or.jp>. Closes: Bug#38107. * partially eliminated feature to display file when manpage is not found, limiting it only when the argument is a pathname containing the character '/'. closes: #41205, #41715, #45979. * created perl script /usr/lib/man-db/chconfig that scans the file in argument (the man confile) and upgrade it to FHS. Its call from postinst is checked also against perl presence. * removed /etc/manpath.config from conffiles; added in postinst automatic copy of it if the existing one isn't being modified, or using the new script to validate it and upgrade to FHS. Treat correctly absence of the config file (??) and allow insertion of keyword NOFHS in /etc/manpath.config to avoid its update. * added list of md5sums from previous conffiles, to help detect unmodified ones. Added to rules file the automatic adding of a new md5 if a new conffile is created. (so maintainers don't have to maintain it) * added Japanese message catalog, curtesy of Fumitoshi UKAI <ukai@debian.or.jp>; closes: bug#43845. * added corrected translations in Italian, thanx to Giovanni Bortolozzo <borto@dei.unipd.it> * changed tests in configure.in to detect new libdb installed from glibc. Closes: bug#39646 * corrected typos in control file, thanx to Richard Braakman <dark@xs4all.nl>, closes: bug#39687 * corrected use of LANG in locale. thanx to ypwong@debian.org, closes: bug#39281. * added patch for HURD for canonicalize_file_name thanx to Marcus Brinkmann (brinkmd@debian.org), closes: bug#39039. Files: abdb36f7651f4367fa62bcf5b1e4b15b 685 doc important man-db_2.3.10-69j.dsc f02d4b367845173c5006e40ea19fb52c 198998 doc important man-db_2.3.10-69j.diff.gz 52a3118e4121484efd1226418e1ab516 298870 doc important man-db_2.3.10-69j_i386.deb -----BEGIN PGP SIGNATURE----- Version: 2.6.3ia Charset: latin1 Comment: Signed by Fabrizio Polacco <fpolacco@prosa.it> iQCVAwUBN+81ln2120Nvcmf1AQHUhQQAgt2Pu4q5LNXO1Ppqiw669VgnFh+uqg2m l8VRZCueVYF/dqFkOwwoamDuvxtH/8NmdPFQr2PErgsXqpRrAzFaazsY2Y1jIua3 IVEUgBNk5BEgKoQ9qt2t5t1Iwf59Mn0ogbVt9hOEQ5j6OleMis2yOD2FYboaL+hW LQAjrCsUgso= =gCFn -----END PGP SIGNATURE-----
Send a report that this bug log contains spam.
Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.