Boost logo

Boost :

Subject: Re: [boost] [gsoc] Request Feedback for Boost.Ustr Unicode String Adapter
From: Marius Stoica (letto2_at_[hidden])
Date: 2011-08-16 08:15:46


On Monday 15 August 2011 20:07:36 Dave Abrahams wrote:
> on Sat Aug 13 2011, Daniel James <dnljms-AT-gmail.com> wrote:
> > On 13 August 2011 19:02, Dave Abrahams <dave_at_[hidden]> wrote:
> >> I think I agree with Artyom here. *Somebody* has to decide how that
> >> datatype will be interpreted when we receive it. Unless we refuse
> >> altogether to accept std::string in our interfaces (which sounds like
> >> a
> >> bad idea to me), why not make the decision that it's UTF-8?
> >
> > Because if the native encoding isn't UTF-8 that will give the wrong
> > result for cases such as:
> >
> > int main(int argc, char** argv)
> > {
> >
> > // ....
> > boost::filesystem::path p(argv[0]);
>
> ? I don't see any utf-8 here

File names and comand line arguments are encoded as utf-8 these days which is
an example of an ascii encoded string transparently transitioning to utf-8.
Indeed as utf-8 was designed to be backwards compatible with ascii it is
natural to treat any string or char* as utf-8.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk