Boost C++ Libraries: Ticket #8535: problem with paths that have whitespace in boost::program_options https://svn.boost.org/trac10/ticket/8535 <p> This seems to be a known bug since at least 2008. Full description and suggested solution is mentioned in the external link below: </p> <p> [boost.2283326.n4.nabble.com/program-options-Problem-with-paths-that-have-spaces-td2576490.html] </p> <p> In short: when a boost::filesystem::path is used directly to retrieve a path parameter, if the path has a whitespace -- regardless of whether / or \ is used, or the whitespace is escaped, or the path is double-quoted -- a parsing error occurs. </p> <p> The current workaround is to use string and then convert that to boost::filesystem::path using the = operator of the path class, however this looks more of a "bug" in program_options rather than new feature in lexical_cast module since in program_options lexical casting of string to path is obviously failing and should not have been considered. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8535 Trac 1.4.3 Georg Sauthoff <mail@…> Sun, 19 Jan 2014 18:04:32 GMT cc set https://svn.boost.org/trac10/ticket/8535#comment:1 https://svn.boost.org/trac10/ticket/8535#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">mail@…</span> added </li> </ul> Ticket Vladimir Prus Mon, 20 Jan 2014 05:49:27 GMT <link>https://svn.boost.org/trac10/ticket/8535#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8535#comment:2</guid> <description> <p> Why is this a program_options problem, as opposed to filesystem problem, as I've explained back then? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Mon, 02 Nov 2015 12:47:45 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8535#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8535#comment:3</guid> <description> <p> I've just hit this bug in 1.59.0, and it's quite annoying. I've read through the thread on the boost mailing list and also <a class="ext-link" href="https://groups.google.com/forum/#!topic/boost-list/TGrrvSWkpoE"><span class="icon">​</span>https://groups.google.com/forum/#!topic/boost-list/TGrrvSWkpoE</a>. Do you think you could sit together with the people from filesystem and/or lexical_cast and implement a solution? That should not be impossible. It would be great, as it's in my opinion quite a serious limitation, and the workaround via string is ugly and non-idiomatic. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 08 Mar 2017 16:28:01 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8535#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8535#comment:4</guid> <description> <p> As an end user of boost program options funcionality, split_winmain not splitting a command line correctly is a program options problem </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 08 Mar 2017 16:28:29 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8535#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8535#comment:5</guid> <description> <p> Is there a fix for this yet? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Vizor</dc:creator> <pubDate>Mon, 08 Jan 2018 16:23:36 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8535#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8535#comment:6</guid> <description> <p> I think, it's showstopper for file path arguments, there is very high chance, that path will contain spaces. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Fri, 13 Jul 2018 04:22:37 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8535#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8535#comment:7</guid> <description> <p> I have encountered it too in 1.67.0. It's really annoying that I have to change path into string. </p> </description> <category>Ticket</category> </item> </channel> </rss>