Re: [gtkmm] UTF8 filenames? (Was One thing we didn't really discuss: ustring vs string)



Murray Cumming wrote:
On Mon, 2002-08-12 at 18:02, Michael Babcock wrote:

Murray Cumming wrote:

At the moment we use std::string in FileSelection::get_filename().
I seem to remember Daniel dealing with this thoroughly and making some
appropriate decision, but this doesn't mean much to me:
http://developer.gnome.org/doc/API/2.0/gtk/gtkfileselection.html#gtk-file-selection-get-filename

Please discuss.


Okay, as long as std::string can contain a UTF8 string (and I see no reason why it can't, it can store all 8-bit characters), this should be fine. That page seems to be implying that the filename is in another encoding (perhaps based on the global system locale) which you should then convert to UTF8 with g_filename_to_utf8. However the filename could also already be in UTF8 of course, in which case that conversion should still work and do nothing. In my opinion global Unix locales are to be worked around, not used, and the only sane ones use utf8, but that's another subject.


This doesn't mean much to me.


Basically I'm just agreeing that the current gtkmm API should be fine. I just wanted to be clear that filenames can be UTF8.


--
Michael Babcock
Jim Henson's Creature Shop





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