Subject: Re: [boost] [General] Always treat std::strings as UTF-8
From: Chad Nelson (chad.thecomfychair_at_[hidden])
Date: 2011-01-18 10:54:57
On Tue, 18 Jan 2011 15:29:05 +0000
Alexander Lamaison <awl03_at_[hidden]> wrote:
> On Tue, 18 Jan 2011 09:51:12 -0500, Chad Nelson wrote:
>> In that case, what would people say to not having any conversion code
>> in the Unicode strings stuff at all (other than between the different
>> UTF-* codings, and maybe to and from ASCII for convenience), and
>> relying on Boost.Locale for that? Then the trade-offs are up to the
>> developer using each.
> I don't think the string classes should implement _any_ of the
> conversions themselves but should delegate them all to Boost.Locale.
> However, they should look like they're doing the conversions by hiding
> the Boost.Locale aspect from the caller as much as possible.
Why delegate them to another library? Those classes already have
efficient, flexible, and correct iterator-based template code for the
conversions between the UTF-* types. I'd rather just farm out the stuff
that those types are weak at, like converting to and from
-- Chad Nelson Oak Circle Software, Inc. * * *
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk