Subject: Re: [boost] [General] Always treat std::strings as UTF-8
From: Alexander Lamaison (awl03_at_[hidden])
Date: 2011-01-17 18:14:48
On Mon, 17 Jan 2011 10:09:13 -0800 (PST), Artyom wrote:
> The problem that the issue is so completated that making
> it absolutly general and on the other hand right is only
> one - decide what you are working with and stick with it.
> In CppCMS project I work with (and I developed Boost.Locale
> because of it) I stick by default with UTF-8 and use plain
> std::string - works like a charm.
> Invening "special unicode strings or storage" does not
> improve anybody's understanding of Unicode neither improve
> its handing.
I don't understand how it could possibly not help. If I see an api
function call_me(std::string arg) I know next to nothing about what it's
expecting from the string (except that by convention it tends to mean
'string in OS-default encoding'). If I see call_me(boost::utf8_t arg), I
know *exactly* what it's after. Further, assuming I know what format my
own strings are in, I know how to provide it with what it expects.
-- Easy SFTP for Windows Explorer (http://www.swish-sftp.org)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk