Abdelrazak Younes <[EMAIL PROTECTED]> writes:
> > | > I'd prefere is most of this work tried to leverage boost::filesystem
> > | > as much as possible.
> > | 
> > | Yes, I think I've read somewhere that boost::filesystem will support
> > | the default encoding of the system in 1.34.
> > 
> > Note that we are using 1.34 now.
> 
> Yes and the support seems to be here indeed. See this for example 
> extracted from the boost source code:
> 
>      inline bool is_directory( const path & ph )
>        { return is_directory<path>( ph ); }
>      inline bool is_directory( const wpath & ph )
>        { return is_directory<wpath>( ph ); }
> 
> The problem is that wpath is using wstring:
> 
>      typedef basic_path< std::wstring, wpath_traits > wpath;
> 
> So I don't know how to make use of that for now. I guess using wstring 
> is out of the question because we already have docstring.

No, all is as it should be. NTFS uses UTF-16 (thanks again, Joost), so that 
can be stored reasonably well in std::wstring although there will be corner 
cases where two wchar_ts are required to represent a single unicode character. 
Think of std::wstring as the way to communicate with the native file system. 
We're only going to do so on file input/output, at which points we're going to 
have to convert between our internal use of docstring (UCS-4) to std::wstring 
(UTF-16).

> I am getting a headache ;-/

Sure. No one said that this wasn't going to be a PITA.

Angus

Reply via email to