On Wed, Sep 18, 2002 at 11:56:50PM +0200, Pablo Saratxaga wrote:
> Has counting characters any usefulness ? (other than doing statistics
> on number of chars)
> 
> Everytime I saw a count of bytes/chars the purpose was always to determine
> the length it has in order to know the place it will take once displayed,
> to do things like proper column alignment, cursor positioning, and such.
> 
> In fact count of display cells is a very good thing to have, and probalby
> what was actually intended in most cases of counting things in text strings;
> it's imply that, until recently, only scripts where 1 char = 1 column were
> supported properly, so the illusion that what was counted were chars
> instead of columns.

Well, there's three counts: characters, bytes and display columns.  Many
of these cases wanted (and still want) bytes.  I agree that the number of
characters is very rarely useful.

While I might think of a couple cases where it's useful, I can't think of
any cases where a lazy person doing a quick port of an application to support
double-width characters and MBCS would care about this.  (He just might
think he does, due to the old habits of using characters, columns and bytes
interchangably, but even Mr. Lazy will have to get over that.)

-- 
Glenn Maynard
--
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/linux-utf8/

Reply via email to