Boost logo

Boost :

From: Joshua Peterson (petersonjm1_at_[hidden])
Date: 2008-08-21 14:47:09


It seems that Boost.FileSystem does not implement some methods accepting
wpath arguments when compiled with GCC 3.4.3 on Linux. This occurs because
BOOST_FILESYSTEM_NARROW_ONLY is defined, which according to the comment in
the code occurs for "badly broken compilers or libraries".

Ideally, I would like to use the boost::filesystem::copy_file() method on
both Windows and Linux, passing wpath arguments in both cases. Is the lack
of wpath support simply a problem with GCC 3.4.3, or is wpath never
supported for copy_file() with GCC?

I can see from the implementation of
boost::filesystem::detail::copy_file_api() that open(), read(), and write()
are used to copy the file. Since open() accepts only a const char* this may
be the limitation. If this is the case, has there been any discussion of
providing a copy_file() method which accepts wpath arguments and converts
from wchar_t to char before calling copy_file_api().

I do not have a lot of experience with locales and character encodings, so I
may be missing something. If this has already been discussed on this
mailing list or elsewhere, please point me to the correct discussion, as I
have been unable to find it. Thanks.

Josh

-- 
Rejoice always. Pray without ceasing. In all circumstances give thanks, for
this is the will of God for you in Christ Jesus. -- 1 Thes. 5:16-18 NAB
--
I am the living bread that came down from heaven; whoever eats this bread
will live forever; and the bread that I will give is my flesh for the life
of the world. -- John 6:51 NAB

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