Peter Dimov wrote:
Vladimir Prus wrote:
For example, you surely want to create boost::path from Unicode string. Do you want to create them from ascii string?
Yes.
Ok.
What encoding that ascii string should be in?
Implementation (OS) defined (by 'ASCII string' you mean narrow string, I presume, since ASCII _is_ an encoding).
(Yes, I meant narrow string).
That's a kind of answer I hoped for. This means that just
basic_path
Would you want to convert unicode path back to ascii?
There is no such thing as an "Unicode path". A path is a path.
Unless there are two classes, basic_path<char> and basic_path
A path constructed from a wide string should be able to give you a narrow string, but whether this narrow string will construct the same path is implementation defined.
Do you think it should be able to *always* give you a narrow string? Even if OS-defined 8-bit encoding cannot represent some of the characters in the original wide string. Won't throwing be more appropriate? - Volodya