Subject: Re: [boost] [General] Always treat std::strings as UTF-8
From: Alexander Churanov (alexanderchuranov_at_[hidden])
Date: 2011-01-14 13:36:10
2011/1/14 John B. Turpish <jbturp_at_[hidden]>:
> I'm not an expert, so take this with a grain of salt. But couldn't it
> just as easily be said that UTF-8 is a waste of CPU? There are a
> number of operations that are constant time if you can assume a fixed
> size for a character that I would think would have to be linear for
> UTF-8, for example accessing the Nth character.
As I understand the choice is between UTF-8 and UTF-16, since UTF-32
is a waste of memory. Given that, there is never fixed size for a
character or linear times - both UTF-8 and UTF-16 are variable-size
encodings of UTF-32.
Boost list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk