git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] gitweb: highlight: strip non-printable characters via col(1)

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 22, 2011, 23:21 UTC
Message-ID
<7vmxf1t4l3.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1314053923-13122-1-git-send-email-cfuhrman@panix.com>
"Christopher M. Fuhrman" <cfuhrman@panix.com> writes:
Show 7 quoted lines
> Strip non-printable control-characters by piping the output produced
> by git-cat-file(1) to col(1) as follows:
>
>   git cat-file blob deadbeef314159 | col -bx | highlight <args>
>
> Note usage of the '-x' option which tells col(1) to output multiple
> spaces instead of tabs.

Are all implementations of col known to correctly handle bytes with their highest bit on, without mistaking them with unknown control sequences? Has the code updated by your patch been tested with non-ASCII payload, at least with UTF-8 outside US-ASCII?

In what locale does the code updated by your patch run under, and would the use of "col" affected by the choice of the locale in a negative way?

For example, here is what I get on my box:
    $ LANG=C LC_ALL=C col -bx <t/t3902-quoted.sh ; echo $?
    col: Invalid or incomplete multibyte or wide character
    1
that makes me ask you these questions.
> I haven't gotten any responses to my patch for a while, so I am now
> submitting this for general inclusion into git.

Unfortunately, no news is not good news around here, and that is why I am asking you the above questions.

Thanks.
Previous: Christopher M. FuhrmanNext: Jakub Narebski
Message 2 of 10 in “gitweb: highlight: strip non-printable characters via col(1)”
  1. gitweb: highlight: strip non-printable characters via col(1)Christopher M. Fuhrman, Aug 22, 2011
  2. Junio C HamanoAug 22, 2011
  3. Jakub NarebskiAug 26, 2011
  4. Junio C HamanoAug 26, 2011
  5. Jakub NarebskiAug 26, 2011
  6. gitweb: Strip non-printable characters from syntax highlighter outputJakub Narebski, Sep 16, 2011
  7. Junio C HamanoSep 16, 2011
  8. Jakub NarebskiSep 16, 2011
  9. Junio C HamanoSep 16, 2011
  10. Christopher M. FuhrmanSep 16, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.