Case folding and the file chooser



Summary: an application does

  f = gtk_file_filter_new ();
  gtk_file_filter_set_name (f, "Word files");
  gtk_file_filter_add_pattern (f, "*.doc");

Later, the file chooser shows a folder from a Windows mount, and no
files show up because they are UPPERCASE.DOC rather than lowercase.doc.

1. "But you should define a MIME type!"  What if the XDG MIME database
doesn't have the type I need?  Also, even if it does, xdgmime uses
fnmatch() without case-folding.

2. "Unix is case-sensitive; live with it".  The result is that the end
user can't find his files.

3. Do we need a virtual GtkFilesystem::fnmatch()?  Then we could in
principle hack gnome-vfs to do the right kind of matching depending on
whether the underlying volume is case-sensitive or not.

This is a problem particularly for OpenOffice while using
GtkFileChooser, as people get files named UPPERCASE.DOC all the time.

  Federico




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