Bernd Gehrmann wrote: > > On Sun, 31 Oct 1999 John Corey wrote: > >Stephan Kulow wrote: > >> > >> Bernd Gehrmann wrote: > >> > > >> > Shouln't KConfig be able to read/write _arbitrary_ strings? > >> > Currently, when I write something like "foo " (with a white- > >> > space at the end), I get back "foo" when reading the entry. > >> > To make it even more inconsistent, this happens only when > >> > the entry is read from disk, not from the cache. > >> > > >> Well, there is even a stripWhiteSpaces in the code to make > >> it easier for humans to edit the entries. But your point is > >> valid. > > > >And if a human edited the file, they'll probably miss/delete the ending > >space. So wouldn't it be better for an app that does this to enclose > >the string in quotes? > > Sorry, but as an application programmer, I certainly do _not_ want > to waste my time thinking about how a user edits a file. That's > KConfig's job, not mine. What else do I have to care about? Tabs, > Commas, linefeeds? What happens if the ini backend is replaced by > an xml backend? Do I have to rewrite my program then to take care > about '<' and '>'? I want an API with a well-defined behaviour, > especially a behavour that is consistent with the documentation. > The removal of whitespace is nowhere documented. Sure. I think, readEntry should always get back what writeEntry wrote. Greetings, Stephan -- Everyone makes mistakes -- but we are more experienced at it anonymous KDE developer