Re: [PATCH] utf8: add utf8_strwidth()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 31 Jan 2009, Jeff King wrote:
I know next to nothing about our encoding functions, but this seems
suspiciously similar to utf8_width in utf8.c. There is also a
git_wcwidth, but I don't know how they relate.

git_wcwidth determines the screen columns of a single ucs_char_t. utf8_width returns the git_wcwidth of the first character in a string. utf8_strwidth (the function added by this patch) is a simple loop around utf8_width, because writing the loop every time would be silly.

On that note, there are probably more cases in the code that ought to use something like utf8_strwidth. I only noticed this one case because I'm working on a project with someone with an accented letter in his last name.

--
Geoffrey Thomas
geofft@xxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux