From: Jeff King Date: Sat, 31 Jan 2009 07:24:25 GMT Subject: Re: [PATCH] builtin-blame.c: Use utf8_strwidth for author's names Message-ID: <20090131072425.GD3033@coredump.intra.peff.net> In-Reply-To: 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