Bug 217864 - KConfigGroup does not accept UTF-8 characters in the group name only upon loading
Summary: KConfigGroup does not accept UTF-8 characters in the group name only upon loa...
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Unmaintained
Component: kdecore (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 211082 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-12-08 14:45 UTC by Dario Freddi
Modified: 2024-06-20 19:06 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dario Freddi 2009-12-08 14:45:51 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

KConfigGroup allows saving groups with UTF-8 characters in the name, however returns an invalid config group upon loading them. This bug was discovered in PowerDevil throughout bug 211082 (which I'll mark as a duplicate of this one), and it's very easy to reproduce. Just create a config group named aèèòa, save it, and try loading it through KConfigGroup constructor afterwards.
Comment 1 Dario Freddi 2009-12-08 14:48:07 UTC
*** Bug 211082 has been marked as a duplicate of this bug. ***
Comment 2 Christoph Feck 2009-12-08 19:59:57 UTC
David, does this fix the issue?

Index: kconfigini.cpp
===================================================================
--- kconfigini.cpp      (revision 1060385)
+++ kconfigini.cpp      (working copy)
@@ -474,6 +474,7 @@
             fclose(fp);
             return false;
         }
+        f.setTextModeEnabled(true);
         writeEntries(locale, f, writeMap);
         f.close();
         fclose(fp);
Comment 3 Oswald Buddenhagen 2010-02-28 22:15:43 UTC
SVN commit 1097299 by ossi:

test reading & writing of groups with accented chars - works

CCBUG: 217864

 M  +20 -0     kconfigtest.cpp  
 M  +1 -0      kconfigtest.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1097299
Comment 4 David Faure 2010-12-23 00:24:29 UTC
Dario: do you still have this issue?
Do you have your test code somewhere? I suspect it might be buggy :)
Comment 5 Dario Freddi 2010-12-28 18:38:23 UTC
Hey, I will try to reproduce later, but the issue hasn't occurred since a while... I'll check and let you know :)
Comment 6 Christoph Cullmann 2024-06-20 19:06:47 UTC
Should be fixed.