Project

General

Profile

Bug #5618

webrev is unable to format (mi in man pages

Added by Marcel Telka almost 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
tools - gate/build tools
Start date:
2015-02-14
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

In a case there is (mi in a man page, for example here in the open(2) man page at line 451:

 449 Upon successful completion, both \\fBopen()\\fR and \\fBopenat()\\fR functions open
 450 the file and return a non-negative integer representing the lowest numbered
 451 unused file descriptor.  Otherwise, \\fB\\(mi1\\fR is returned, \\fBerrno\\fR is set
 452 to indicate the error, and no files are created or modified.

the webrev is unable to format this properly in the TXT output (see line 303):

 300 RETURN VALUES
 301        Upon successful completion, both open() and openat() functions open the
 302        file and return a non-negative integer representing the lowest numbered
 303        unused file descriptor.  Otherwise,1 is returned, errno is set to
 304        indicate the error, and no files are created or modified.

Note: The HTML output is correct.

#1

Updated by Marcel Telka almost 6 years ago

  • Subject changed from webrev is unable to format (mi in in man pages to webrev is unable to format (mi in man pages
#2

Updated by Yuri Pankov almost 6 years ago

It is, most likely, the result of using `mandoc -Tutf8` while running in C locale. The easiest (that is, not best or correct one) fix is to switch to using `mandoc -Tascii`.

#3

Updated by Marcel Telka almost 6 years ago

Tried with this change in the webrev:

--- webrev      2014-12-06 09:40:03.163000227 +0100
+++ webrev.sh   2015-02-18 19:16:03.774662977 +0100
@@ -3170,16 +3170,16 @@
        #
        if [[ -f "$nfile" && "$nfile" = *.+([0-9])*([a-zA-Z]) && \\
            -x $MANDOC && -x $COL ]]; then
-               $MANDOC -Tutf8 $nfile | $COL -b > $nfile.man.txt
+               LC_ALL=en_US.UTF-8 $MANDOC -Tutf8 $nfile | $COL -b > $nfile.man.txt
                source_to_html txt < $nfile.man.txt > $nfile.man.txt.html
                print " man-txt\\c" 
                print "$MANCSS" > $WDIR/raw_files/new/$DIR/man.css
-               $MANDOC -Thtml -Ostyle=man.css $nfile > $nfile.man.html
+               LC_ALL=en_US.UTF-8 $MANDOC -Thtml -Ostyle=man.css $nfile > $nfile.man.html
                print " man-html\\c" 
-               $MANDOC -Tascii $nfile > $nfile.man.raw
+               LC_ALL=en_US.UTF-8 $MANDOC -Tascii $nfile > $nfile.man.raw
                print " man-raw\\c" 
                if [[ -f "$ofile" && -z $mv_but_nodiff ]]; then
-                       $MANDOC -Tutf8 $ofile | $COL -b > $ofile.man.txt
+                       LC_ALL=en_US.UTF-8 $MANDOC -Tutf8 $ofile | $COL -b > $ofile.man.txt
                        ${CDIFFCMD:-diff -bt -C 5} $ofile.man.txt \\
                            $nfile.man.txt > $WDIR/$DIR/$F.man.cdiff
                        diff_to_html $F $DIR/$F "C" "$COMM" < \\

but it didn't help.

#4

Updated by Yuri Pankov almost 6 years ago

Ok, that's col(1) doing, thinking the symbol produced by '(mi' is not printable, and leaving only ^H (from the <symbol>^H<symbol>).

#5

Updated by Marcel Telka over 5 years ago

  • Status changed from New to In Progress
  • Assignee set to Yuri Pankov
#6

Updated by Electric Monk over 5 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 83885279ef0a4e648dec5ed9b6933631923e8a6a

commit  83885279ef0a4e648dec5ed9b6933631923e8a6a
Author: Yuri Pankov <yuri.pankov@nexenta.com>
Date:   2015-06-12T19:19:17.000Z

    5618 webrev is unable to format (mi in man pages
    Reviewed by: Marcel Telka <marcel@telka.sk>
    Approved by: Gordon Ross <gwr@nexenta.com>

Also available in: Atom PDF