After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 163029 - GKeyFile/Windows .ini files difference missing
GKeyFile/Windows .ini files difference missing
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
2.6.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2005-01-05 17:00 UTC by Bastien Nocera
Modified: 2005-01-06 21:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
glib-keyfile-docs.patch (629 bytes, patch)
2005-01-05 22:59 UTC, Bastien Nocera
none Details | Review

Description Bastien Nocera 2005-01-05 17:00:23 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).
Comment 1 Owen Taylor 2005-01-05 18:01:51 UTC
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.
Comment 2 Bastien Nocera 2005-01-05 18:12:41 UTC
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.
Comment 3 Bastien Nocera 2005-01-05 22:59:37 UTC
Created attachment 35512 [details] [review]
glib-keyfile-docs.patch

Patch for the above docs changes.
Comment 4 Matthias Clasen 2005-01-06 21:48:49 UTC
2005-01-06  Matthias Clasen  <mclasen@redhat.com>

	* glib/tmpl/keyfile.sgml: Add hint about group name 
	case sensitivity.  (#163029, Bastien Nocera)