[PATCH] kdemultimedia/kioslave/audiocd

David Faure dfaure at klaralvdalens-datakonsult.se
Tue Dec 16 00:07:52 GMT 2003


On Tuesday 16 December 2003 00:11, Allan Sandfeld Jensen wrote:
> On Monday 15 December 2003 22:07, David Faure wrote:
> > On Monday 15 December 2003 20:05, André Wöbbeking wrote:
> > > On Monday 15 December 2003 10:15, David Faure wrote:
> > > > On Sunday 14 December 2003 14:44, André Wöbbeking wrote:
> > > > >  atom.m_str = url.fileName().replace('/', QFL1("%2F"));
> > > >
> > > > This is wrong, it'll miss encoding % itself - this should use
> > > > KIO::encodeFileName.
> > >
> > > I only replaced filename() with fileName(). Why must % be encoded, for
> > > KUrl magic?
> >
> > No, to differenciate %2F (for slash) with %2F (as an actual part of the
> > filename). KIO::encodeFileName turns % into %%.
> >
> Why do we need to differenciate? Can't we assume both are meant to be 
> displayed as a slash?

Sorry, when I said filename I didn't mean on the filesystem, I meant
"the user-visible file name".

Standard computer rule: when you escape a character, you also need to be
able to escape the escape character itself.

-- 
David Faure -- faure at kde.org, dfaure at klaralvdalens-datakonsult.se
Qt/KDE/KOffice developer
Klarälvdalens Datakonsult AB, Platform-independent software solutions




More information about the kde-core-devel mailing list