diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 8bbf232b57..90246a2f3e 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,8 @@ +2004-04-15 Federico Mena Quintero + + * gtk/tmpl/gtkfilechooser.sgml: Added a section explaining + character encoding for filenames. + 2004-04-13 Matthias Clasen * gtk/tmpl/gtkuimanager.sgml: Some corrections. diff --git a/docs/reference/gtk/tmpl/gtkfilechooser.sgml b/docs/reference/gtk/tmpl/gtkfilechooser.sgml index 8d88ae5324..f8a003f9c3 100644 --- a/docs/reference/gtk/tmpl/gtkfilechooser.sgml +++ b/docs/reference/gtk/tmpl/gtkfilechooser.sgml @@ -15,6 +15,35 @@ File chooser interface used by #GtkFileChooserWidget and #GtkFileChooserDialog. programming interface. + + File Names and Encodings + + + When the user is finished selecting files in a + #GtkFileChooser, your program can get the selected names + either as filenames or as URIs. For URIs, the normal escaping + rules are applied if the URI contains non-ASCII characters. + However, filenames are always returned in + the character set specified by the + G_FILENAME_ENCODING environment variable. + Please see the Glib documentation for more details about this + variable. + + + + + This means that while you can pass the result of + gtk_file_chooser_get_filename() to + open(2) or + fopen(3), you may not be able to + directly set it as the text of a #GtkLabel widget unless you + convert it first to UTF-8, which all GTK+ widgets expect. + You should use g_filename_to_utf8() to convert filenames + into strings that can be passed to GTK+ widgets. + + + + Adding a Preview Widget