RFC: escape strings in KConfigBase
thiago at kde.org
Wed May 16 18:05:16 BST 2007
Aaron J. Seigo wrote:
>it seems far easier to simply be careful about what values we store in
>kdeglobals that is shared by kde3/kde4 apps (style name, keyboard
> shortcuts, etc) and make kconfigini escape values properly before
> writing to disk and unescape when reading.
Agreed. Escaping values should be done. I see no reason why one would be
restricted in what data one can save. We should be able to store any
binary data, including newlines and NULs.
It seems though that the % character is a bad idea for escaping
(%-encoding) if we want to keep close compatibility with desktop files
(think Exec lines).
One possibility to introduce something like:
Another is C-style backslash escaping:
What I am unsure about is escaping of *keys*. I know, QSettings allows it,
but I remain unconvinced.
>yes, there's overhead there, but i doubt it's in any way really
> impactful for the user in a negative fashion.
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the kde-core-devel