public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Sergey Vlasov <vsu@altlinux•ru>
To: linux@horizon•com
Cc: junkio@cox•net, git@vger•kernel.org
Subject: Re: [PATCH] git-blame: Make the output human readable
Date: Wed, 8 Mar 2006 17:32:49 +0300	[thread overview]
Message-ID: <20060308173249.1faed1d7.vsu@altlinux.ru> (raw)
In-Reply-To: <20060306193326.19262.qmail@science.horizon.com>

[-- Attachment #1: Type: text/plain, Size: 973 bytes --]

On 6 Mar 2006 14:33:26 -0500 linux@horizon•com wrote:

> Well, getting 15 characters in UTF-8 is easy (just stop before the 16th
> byte for which ((b & 0xc0) != 0x80)), but what about combining characters?
> 
> You've got accents and stuff to worry about.  And the annoying fact that
> Unicode defined accents as suffixes, so you have to go past the 15th
> column to include all of the 
> 
> And then there's that fact that many characters are traditionally
> represented as double-wide forms, even on character terminals.
> 
> See http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c for details
> an an example implementation of wcwidth().
> 
[skip]
> 			/* Now find the width of it */
> 			w = wcwidth(c);

And this won't work, unless you also add that wcwidth() implementation
to git.

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).

[-- Attachment #2: Type: application/pgp-signature, Size: 190 bytes --]

  reply	other threads:[~2006-03-08 14:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-06 19:33 [PATCH] git-blame: Make the output human readable linux
2006-03-08 14:32 ` Sergey Vlasov [this message]
2006-03-08 18:04   ` linux
2006-03-08 18:30     ` Sergey Vlasov
2006-03-08 19:06       ` linux
  -- strict thread matches above, loose matches on Subject: below --
2006-03-05 11:03 Fredrik Kuivinen
2006-03-05 12:10 ` Junio C Hamano
2006-03-05 12:38   ` Fredrik Kuivinen
2006-03-05 14:23     ` Johannes Schindelin
2006-03-05 21:28     ` Junio C Hamano
2006-03-07 16:34       ` Fredrik Kuivinen
2006-03-05 14:11   ` Johannes Schindelin

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=20060308173249.1faed1d7.vsu@altlinux.ru \
    --to=vsu@altlinux$(echo .)ru \
    --cc=git@vger$(echo .)kernel.org \
    --cc=junkio@cox$(echo .)net \
    --cc=linux@horizon$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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