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

Re: [PATCH] git-blame: Make the output human readable

From
Sergey Vlasov <vsu@altlinux.ru>
Date
Mar 8, 2006, 18:30 UTC
Message-ID
<20060308183059.GD9555@procyon.home>
In-Reply-To
<20060308180422.27978.qmail@science.horizon.com>
On Wed, Mar 08, 2006 at 01:04:22PM -0500, linux@horizon.com wrote:
Show 12 quoted lines
> > And this won't work, unless you also add that wcwidth() implementation
> > to git.
> 
> That was the general idea.  It is freely usable.
> 
> > The problem is that the wchar_t encoding is not specified anywhere -
> > glibc uses Unicode for it, but other systems can use whatever they want
> > (even locale-dependent).
> 
> Why is that a problem?  None of the code mentioned even uses wchar_t.
> The code I wrote converts from UTF-8 to straight Unicode, and that's
> what Markus Kuhn's wcwidth() expects as an argument.
wcwidth() is a standard library function which takes a wchar_t:
http://www.opengroup.org/onlinepubs/009695399/functions/wcwidth.html

It is easy to write a program which assumes that wchar_t is Unicode without noticing it, because it will work fine with glibc...

So that mk_wcwidth() must be used unconditionally, and not as a fallback for systems which do not provide wcwidth() in libc.

Previous: linux@horizon.comNext: linux@horizon.com
Message 4 of 5 in “Re: [PATCH] git-blame: Make the output human readable”
  1. linux@horizon.comMar 6, 2006
  2. Sergey VlasovMar 8, 2006
  3. linux@horizon.comMar 8, 2006
  4. Sergey VlasovMar 8, 2006
  5. linux@horizon.comMar 8, 2006

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.