git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Geoffrey Thomas <geofft@MIT.EDU>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>, git@vger.kernel.org
Subject: Re: [PATCH] builtin-blame.c: Use utf8_strwidth for author's names
Date: Sat, 31 Jan 2009 02:24:25 -0500	[thread overview]
Message-ID: <20090131072425.GD3033@coredump.intra.peff.net> (raw)
In-Reply-To: <alpine.DEB.2.00.0901301710130.1984@vinegar-pot.mit.edu>

On Fri, Jan 30, 2009 at 05:22:07PM -0500, Geoffrey Thomas wrote:

> I don't believe there are any encoding conversions performed up to that  
> point. IIRC git doesn't require any encoding but encourages UTF-8; if it's 
> something obscure, I have no way of knowing how wide in screen columns the 
> author field is because I likely don't have a library for it in git at  
> all. I do have a utf8.c, though.

Don't we pull the author from the commit message after it has been
converted using reencode_commit_message (see get_commit_info)? That
should be respecting the log output encoding.

It looks like we just throw away the information on what we encoded _to_
(i.e., the second parameter of reencode_commit_message).  Probably we
need to remember that and use a generic "what is the width of this
string in this encoding" function.

-Peff

  reply	other threads:[~2009-01-31  7:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-30  9:41 [PATCH] utf8: add utf8_strwidth() Geoffrey Thomas
2009-01-30  9:41 ` [PATCH] builtin-blame.c: Use utf8_strwidth for author's names Geoffrey Thomas
2009-01-30 17:12   ` Johannes Schindelin
2009-01-30 22:22     ` Geoffrey Thomas
2009-01-31  7:24       ` Jeff King [this message]
2009-02-01 22:34       ` Johannes Schindelin
2009-02-02  6:48         ` Junio C Hamano
2009-02-02 12:40           ` Johannes Schindelin
2009-02-03  4:30             ` Junio C Hamano
2009-02-02 12:41           ` Jeff King
2009-01-31  7:17 ` [PATCH] utf8: add utf8_strwidth() Jeff King
2009-01-31  8:51   ` Geoffrey Thomas
2009-01-31  8:56     ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090131072425.GD3033@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=geofft@MIT.EDU \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).