Re: Breaking changes in file layout

Tobias Leupold <[email protected]> Mon, 06 Apr 2020 12:22:27 +0200
Newsgroups gmane.comp.kde.kimdaba
Message-ID <2415096.Lt9SDvczpP@ginuog>
> > I personally would prefer the hash. Maybe we could add a file like
> > "collection" or such containing the path to index.xml for easier user-side
> > identification. I wouldn't add the whole path. If so, please at least
> > don't
> > use pipe symbols to mask the slashes, that also have to be masked when
> > using the directory name ...
>
> Nope, I don't like the hash either. If you don't like pipe symbols you
> could use - nothing:
>
> echo -n /home/johannes/Pictures/index.xml | sed s,/,,g
>
> or use the URL encoding for the whole path, see below.

Well, apparently we'll have to disuss this further and find a nice solution
that everybody can live with ;-)

> > Additionally, we need a better masking of non-alphanumerical characters,
> > so
> > that e. g. "/" is a category isn't a problem (like a "%" followed by the
> > number we would use to define the character like in HTML's &#123; or
> > such?).

> Yes, almost. When you use URLs....
>
> https://www.w3schools.com/tags/ref_urlencode.ASP
>
> > URL encoding replaces unsafe ASCII characters with a "%" followed by two
> > hexadecimal digits.
> Functions to encode/decode this should be available.

Actually, there's QUrl::toPercentEncoding(). Thanks for the hint :-)