Re: Glib::ustring tradeoffs?



Vinzenz 'evilissimo' Feenstra wrote:
> Since there is a operator std::string() in Glib::ustring you will be
> abled using everything what wants a std::string, but I don't think that
> neither  the algorithms nor boost::filesystem will work with a utf8
> encoding. So you might use locale_from_utf and locale_to_utf functions
> to convert between encodings if it possible at all.

Let's say I have a filename named "übung1.txt" (Note the umlaut--if your newsreader can display it hehe). Will this filename make trouble with std::string, or be lost/replaced when converting to Unicode?

I really really need to consider this well, because I am using a lot of convenience functions from boost::filesystem, such as path::branch_path() to retrieve the parent folder of a path. Or all the helper functions which can check for existence of a file, or those which can expand a basename to a full path... The list goes on.

If I decide to use Glib::ustring now, all these function may become unavailable (and I will have to look elsewhere for similar functionality, and I will lose a lot of time).

- Matthias




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]