list separator in config entries

Andreas Hartmetz ahartmetz at gmail.com
Mon Oct 8 12:22:02 BST 2007


2007/10/8, Oswald Buddenhagen <ossi at kde.org>:
> On Mon, Oct 08, 2007 at 12:15:05PM +0200, Andreas Hartmetz wrote:
> >
> breaking attributions is Bad (TM).
>
> > > > Everything works fine if you escape the escape char - this is in the
> > > > spec IIRC.
> > > >
> > > hmm? i quoted the spec literally - there is nothing beyond it.
> > >
> > > > The parser just needs to be smart enough to recognize '\\;' as
> > > > "escaped backslash-semicolon" instead of "oh, there's a \, so let's
> > > > parse that and uh, we also have a single backslash in front of  it".
> > > >
> > > this doesn't make any sense. formulate clear rules and provide complex
> > > examples to prove that they don't break down in corner cases.
> > >
> > The spec does specify a way to escape tab, space, newline, and also
> > backslash. Now if you don't feign extreme stupidity when implementing
> > it you just take the freedom to escape all the backslashes.
> >
> this completely misses the point. the question is at which point lists
> are serialized and therefore through how many escaping passes they go.
>
Ahem yes, I missed that.
You are arguing for another refactoring of KConfig here which I assume
was not your intention. I agree that we need to fix things right, and
you just pointed out a very good reason why. Somehow I missed that
double escaping would also break desktop files.
For the record: The refactoring would consist of moving list handling
into the backend(s) and merging it with escaping code.

> > The format may be somewhat underspecified but anybody who knows a
> > thing or two about escaping rules that work knows what is really meant
> > by the spec.
> >
> assuming that the spec is implemented only by people who know anything
> about working escaping is pretty naive. assuming this of people who
> write .desktop files is just stupid.
>
Agree about people writing .desktop files. Programmers OTOH should
know what they are doing.




More information about the kde-core-devel mailing list