Subject: Re: [boost] [UTF String] UTF String library 1.5 ready for perusal
From: Anders Dalvander (boost_at_[hidden])
Date: 2011-02-14 04:05:28
Jeremy Maitin-Shepard <jeremy <at> jeremyms.com> writes:
> In cases where there is a limit
> of the maximum length of a string, I believe that is almost certainly
> going to be in terms of the encoded length in a particular encoding
> (i.e.g UTF-8 or UTF-16), rather than in code points.
Cutting any variable-width encoded string after a certain number of code units
is as useful as to cut a dollar bill in half. After you have done it, it loose
Having said that, the same applies to cutting a string after a certain number of
code points, but here you could compare it to tear off a corner of a bill.
Counting graphemes or grapheme clusters is usually the way to go.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk