Boost logo

Boost :

Subject: Re: [boost] [general] What will string handling in C++ looklike inthe future [was Always treat ... ]
From: Peter Dimov (pdimov_at_[hidden])
Date: 2011-01-19 15:15:10


Dave Abrahams wrote:
> At Wed, 19 Jan 2011 19:09:48 +0200,
> Peter Dimov wrote:
> > The problem with using an Unicode string, be it QString or
> > utf8_string, to represent paths is that it forces you to pick an
> > encoding under POSIX. When the OS gives you a file name as char*, to
> > store it in your Unicode string, you have to interpret it. Then, to
> > give it back to the OS, you have to de-interpret it.
>
> Nonono; if you don't want to choose an encoding, you store it as a
> raw_string, (a.k.a. std::string, for example)!

OK. You're designing a portable library that talks to the OS. It has the
following functions:

    T get_path( ... );
    void process_path( T );

What do you use for T? string or utf8_string?


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