z/OS Tools & Language

Expand all | Collapse all

Git man page has nul characters, truncated output

  • 1.  Git man page has nul characters, truncated output

    Posted 08-17-2018 10:21

    In z/OS 2.2, I am using:
    git version 2.3.5_os390_b013
    /bin/man as shipped by IBM

    When I type “man git”, the second paragraph of the DESCRIPTION section gets truncated, such as the second line of the example:
    “See gittutorial(7) to get started, then see Everyday Git[1] for a useful minimum set of commands.
    The Git Userb
    After you mastered the basic concepts, you can come back to this page to learn what commands Git”

    There are other sections like this as well.

    If I do a hex dump on the man page, I see that there are instances where a x’0019’ combination of bytes appears in various places where the truncation occurs.

    I issue this command; these are IBM’s man & od commands:
    $ man git | od -t cxC

    Which shows the binary characters after the string “The Git Userb”:
    0000001420 T h e G i t U s e r b \0 031
    40 E3 88 85 40 C7 89 A3 40 E4 A2 85 99 82 00 19

    Is the git man page shipped this way, or did I miss something in my install?



  • 2.  RE: Git man page has nul characters, truncated output

    Posted 08-20-2018 02:00

    Hi John. I see the same on my z/OS 2.2 system too.

    I did a bit more poking around and have concluded is a translation problem. Looking at ‘man git’ on my PC I see the following:

    > 0001600        G  \b   G   i  \b   i   t  \b   t       U  \b   U   s  \b
    >            20  47  08  47  69  08  69  74  08  74  20  55  08  55  73  08
    > 0001620    s   e  \b   e   r  \b   r   '  \b   '   s  \b   s       M  \b
    >            73  65  08  65  72  08  72  27  08  27  73  08  73  20  4d  08
    

    You can see its in ASCII (UTF8 maybe).

    On z/OS its in EBCDIC

    0000001420         T   h   e       G   i   t       U   s   e   r   b  \0 031
                  40  E3  88  85  40  C7  89  A3  40  E4  A2  85  99  82  00  19
    0000001440     s       M   a   n   u   a   l   [   2   ]       h   a   s    
                  A2  40  D4  81  95  A4  81  93  AD  F2  BD  40  88  81  A2  40
    

    Note that all the highlighting has been removed too. It seems “man” highlights characters the way the old teletypes did, ie print the character, backspace, and print it again. X’47’ X’08’ x’47’ highlights the “G” character.

    To me this indicates its not a direct ASCII => EBCDIC conversion, as the highlighting sequences have been removed in the z/OS version.

    It looks like there is a problem converting quotes. Hopefully the guys from Rocket can confirm.

    Gary



  • 3.  RE: Git man page has nul characters, truncated output

    Posted 08-21-2018 06:52

    Hi,

    This problem will be fixed for 2.14.4 git version.

    Thanks,
    Sergey