Boost logo

Boost :

Subject: Re: [boost] [filesystem] basic_path::operator>> issue for paths with spaces
From: Scott McMurray (me22.ca+boost_at_[hidden])
Date: 2008-09-22 16:28:57


On Mon, Sep 22, 2008 at 16:17, Andrew James <aj_at_[hidden]> wrote:
> That can be generalized to the only character not allowed is the path separator. But that separator itself doesn't really need to be stored. How bout a serialization like
>
> /My/Path/With Spaces/
>
> 3 2 My4 Path11With Spaces
>
> This encodes, 3 components then the components follow.
>

This works, but I don't think that serialization is the problem. I
see the <</>> operators as for user-facing I/O, and such a format is
unacceptable for that usage.

The string literal-style escaping seems like the only reasonable
format to me. Especially if it's only output when there are spaces in
the path (or the first character of the path is a quotation mark), and
then operator>> reads like it does now if there's no quotation mark as
the first character.


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