Skip site navigation (1)Skip section navigation (2)
Date:      18 Oct 2020 14:05:46 -0400
From:      "John R. Levine" <>
To:        "Steve O'Hara-Smith" <>
Subject:   Re: printf(1) and UTF-8 multi-byte chars
Message-ID:  <>
In-Reply-To: <>
References:  <> <20201018154838.49CBC239CEDF@ary.qy> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
> 	There are good reasons for using all three levels, here are some:
> Bytes: Content length headers, malloc calls - storage related


> Glyphs: Truncation, apparent length, sorting - appearance related

Not so much.  I suppose it's preferable to truncate at a glyph boundary, 
but sorting UTF-8 bytes gives you the same order as sorting the glyphs, 
and for useful sorting you need to deal with issues like normalized forms 
and case folding.  Not sure what use apparent length would be since the 
number of glyphs tells you neither the number of visible characters nor 
how wide they are.

> Unicode Characters: UTF-8/16/32 conversions - encoding related

That and a lot of composition and display issues.

John Levine,, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail.

Want to link to this message? Use this URL: <>