
19 Jan
2011
19 Jan
'11
8:15 p.m.
Dave Abrahams wrote:
At Wed, 19 Jan 2011 19:09:48 +0200, Peter Dimov wrote:
The problem with using an Unicode string, be it QString or utf8_string, to represent paths is that it forces you to pick an encoding under POSIX. When the OS gives you a file name as char*, to store it in your Unicode string, you have to interpret it. Then, to give it back to the OS, you have to de-interpret it.
Nonono; if you don't want to choose an encoding, you store it as a raw_string, (a.k.a. std::string, for example)!
OK. You're designing a portable library that talks to the OS. It has the following functions: T get_path( ... ); void process_path( T ); What do you use for T? string or utf8_string?