GNOME Bugzilla – Bug 163029
GKeyFile/Windows .ini files difference missing
Last modified: 2005-01-06 21:48:49 UTC
As can be seen in this API docs, the Windows equivalent of g_key_file_get_string(): http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/getprofilestring.asp Windows .INI files aren't case-sensitive ("The GetProfileString function is not case-sensitive; the strings can contain a combination of uppercase and lowercase letters."). GKeyFile uses strcmp to do group, and key name comparisons, making it case-sensitive. Either the docs need to be updated to take this into account, or comparisons should be case-insensitive (which I'd rather).
I think it's explicitely documented that GKeyFile does *not* follow the Windows rules, and that Get[Private]ProfileString() should be used to read real .INI files on windows.
The documentation says: This syntax is obviously inspired by the .ini files commonly met on Windows, but there are some important differences: * .ini files use the ';' character to begin comments, key files use the '#' character. * Key files allow only comments before the first group. * Key files are always encoded in UTF-8. " I'd advise adding: * Key and group names are case-sensitive.
Created attachment 35512 [details] [review] glib-keyfile-docs.patch Patch for the above docs changes.
2005-01-06 Matthias Clasen <mclasen@redhat.com> * glib/tmpl/keyfile.sgml: Add hint about group name case sensitivity. (#163029, Bastien Nocera)