bugGNU roff - Bugs: bug #49887, [nroff] want -D option (in...

 
 

bug #49887: [nroff] want -D option (in particular, -Dutf8)

Submitter:  None
Submitted:  Mon 19 Dec 2016 01:46:20 PM UTC
Votes: 1
 
Category:  Core Severity:  1 - Wish
Item Group:  Feature change Status:  Rejected
Privacy:  Public Assigned to:  carstenkunze
Open/Closed:  Closed Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 05 Mar 2022 11:27:06 PM UTC, comment #7: 

This ticket was opened and closed before my time, but I'd like to point out two things.

1. "Why does groff(1) has the -Dutf8 option then if the 'true' way of dealing with charsets is to use preconv?"  The `-D` option to groff(1) causes that program to run preconv(1) as a preprocessor.  See the groff(1) man page.  (While I think I've improved it since, the 1.22.4 version seems perfectly clear on this point.)

2. I don't know what good it would do to have an nroff flag to cause preconv to use a character encoding that doesn't match that of the terminal to which it is writing.  nroff attempts to detect that encoding, and has done so since...let's see, well, it was using LESSCHARSET way back in 2000, and the character-set-detection feature appears to have reached its modern form in 2007.

G. Branden Robinson <gbranden>
Group administrator
Tue 20 Dec 2016 12:34:49 PM UTC, comment #6: 

Why does groff(1) has the -Dutf8 option then if the 'true' way of dealing with charsets is to use preconv?


Vladimir Nikishkin <lockywolf>
Tue 20 Dec 2016 12:10:30 PM UTC, comment #5: 

This is not a groff issue.  There are two major manpage formatting tools: mdocml (aka mandoc(1)) and groff.  mdocml has it's own man(1) version which does format UTF8 manpages correctly.  The systems which are using groff should configure their man(1) correctly to use preconv.  So it looks like man(1) or man(1) configuration issue, not a groff issue.  BTW: The Linux systems I know display UTF8 manpages correctly.

Carsten Kunze <carstenkunze>
Group Member
Tue 20 Dec 2016 09:49:34 AM UTC, comment #4: 

Well, essentially, I don't use nroff at all, but the Linux man utility (as well as many other UNIX man utilities) does.

And since most man pages are in utf8 nowadays, it really is a pain to see gibberish in the man pages on every freshly installed system.

Perhaps, we could convince the authors of Linux man to use preconv | nroff or groff -Dutf8, but it may not be so easy for commercial unices.

Or, maybe, -Dutf8 could even be a default option in nroff's call to groff.

Vladimir Nikishkin <lockywolf>
Tue 20 Dec 2016 09:27:09 AM UTC, comment #3: 

AFAIK -D is not a GNU troff option but a groff(1) option. You may put preconv with option -D in the pipe before nroff to get the behaviour you expect. Likely it is also possible to use groff(1) with option -D and option -Tutf8 for this, but I never use groff(1) but the pipe "preconv | nroff" instead.

Carsten Kunze <carstenkunze>
Group Member
Tue 20 Dec 2016 06:25:51 AM UTC, comment #2: 

True, it does support the -T option.

Basically, adding support for -D shouldn't be too hard. Probably, just copying the code for the -T option.


Anonymous
Mon 19 Dec 2016 03:02:24 PM UTC, comment #1: 

Option -T is supported by nroff.  -Tutf8 even is the default, I e.g. need to use -Tascii to get ASCII output instead of UTF-8 encoded characters.

Carsten Kunze <carstenkunze>
Group Member
Mon 19 Dec 2016 01:46:20 PM UTC, original submission:  

Troff supports -D and -T options to indicate character encodings, whereas Nroff doesn't.

At the same time, nroff is used by man to format man pages (and nroff -mandoc) is default in /etc/man.conf.

Could the -D option be added to nroff, or, maybe, just proxied to troff (since, afaiu, nroff calls troff inside).

This would greatly enhance the user-friendliness of an average Linux distro, since many internationalised man pages are supplied in utf8.

It shouldn't be too hard to implement, since troff already supports this option.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (Posted a comment)
  • -email is unavailable- added by lockywolf (Posted a comment)
  • -email is unavailable- added by lockywolf (Voted in favor of this item)
  • -email is unavailable- added by lockywolf (Original anonymous bug creator.)
  • -email is unavailable- added by carstenkunze (Posted a comment)
  •  

    There is 1 vote so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-03-05 gbranden Assigned toNone carstenkunze
    2022-03-05 gbranden CategoryNone Core
        Severity3 - Normal 1 - Wish
        Summarynroff -D option (in particular, -Dutf8) [nroff] want -D option (in particular, -Dutf8)
    2017-04-28 carstenkunze StatusNone Rejected
        Open/ClosedOpen Closed
    2016-12-20 lockywolf Carbon-Copy- Added lockywolf
    2016-12-20 lockywolf Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code