bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: diff -y + UTF-8 = irregular columns


From: John Cowan
Subject: Re: diff -y + UTF-8 = irregular columns
Date: Wed, 23 Jan 2008 11:18:28 -0500
User-agent: Mutt/1.5.13 (2006-08-11)

Bruno Haible scripsit:

> Here is a proposed fix that
>   - works in all locales, not only UTF-8 locales,
>   - also considers the case of input that is not valid in the current
>     locale, e.g. ISO-8859-1 input in an UTF-8 locale),
>   - does not introduce code duplication.

I am not opposed to this patch, but I would point out that it's
incomplete, for it assumes that characters are monowidth -- which
is better than assuming that bytes are, but still untrue even in a
monowidth font.  Unicode combining characters are zero-width, and the
individual jamo of a Hangul syllable occupy only one width slot.

-- 
John Cowan    http://ccil.org/~cowan  address@hidden
The Penguin shall hunt and devour all that is crufty, gnarly and
bogacious; all code which wriggles like spaghetti, or is infested with
blighting creatures, or is bound by grave and perilous Licences shall it
capture.  And in capturing shall it replicate, and in replicating shall
it document, and in documentation shall it bring freedom, serenity and
most cool froodiness to the earth and all who code therein.  --Gospel of Tux




reply via email to

[Prev in Thread] Current Thread [Next in Thread]