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

Re: [PATCH] git-am: force egrep to use correct characters set

From
Jeff King <peff@peff.net>
Date
Sep 28, 2009, 07:16 UTC
Message-ID
<20090928071609.GB20483@coredump.intra.peff.net>
In-Reply-To
<20090928065519.GA24773@lamagra.informatik.uni-ulm.de>
On Mon, Sep 28, 2009 at 08:55:19AM +0200, Christian Himpel wrote:
Show 12 quoted lines
> > Do you happen to know a charset in which this is a problem, just for
> > reference?
> 
> No, I don't know any charset with stray ascii-chars.  I just listened
> attentively, when I read the part about the mixed alphabet characters in
> the grep(1) manpage.
> 
> I did some quick checks just now.  It seems the characters (' ' to '~')
> are in any locale, offered by glibc, at the same place.
> 
> Maybe, we can just leave the charset as it is and ignore this patch,
> until someone complains.

Thanks for looking into it. My question was more of a "how bad is this, and should we be fixing these other callsites, too". But I think 0-7 is probably a pretty safe range in any charset.

Usually with portability issues, I am inclined to say "wait for a problem", as we try to code to match actual reality instead of documentation or standards. But in this case, we are unlikely to test with strange charsets (or even know which strange charsets exist; checking what's in glibc is reasonable, but I have no idea what else is out there in other countries), and that the resulting bug would be subtle and hard to find, it probably makes sense to be a little defensive.

-Peff
Previous: Christian HimpelNext: Johannes Sixt
Message 7 of 11 in “git-am: fixed patch_format detection according to RFC2822”
  1. 1/2 git-am: fixed patch_format detection according to RFC2822Christian Himpel, Sep 25, 2009
  2. 2/2 git-am: force egrep to use correct characters setChristian Himpel, Sep 25, 2009
  3. 2/2 git-am: force egrep to use correct characters setChristian Himpel, Sep 25, 2009
  4. git-am: force egrep to use correct characters setChristian Himpel, Sep 25, 2009
  5. Jeff KingSep 27, 2009
  6. Christian HimpelSep 28, 2009
  7. Jeff KingSep 28, 2009
  8. Johannes SixtSep 28, 2009
  9. Christian HimpelSep 28, 2009
  10. Johannes SixtSep 28, 2009
  11. Christian HimpelSep 28, 2009

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.