[mythtv-users] ERROR: LocalFilePath unable to find local path for ...
Karl Newman
newmank1 at asme.org
Thu Mar 2 22:26:35 UTC 2017
On Thu, Mar 2, 2017 at 11:52 AM, Brian J. Murrell <brian at interlinx.bc.ca>
wrote:
> On Thu, 2017-03-02 at 14:27 -0500, Brian J. Murrell wrote:
> > QT bug?
>
> Or not:
>
> #include <QString>
> #include <QUrl>
> #include <iostream>
>
> using namespace std;
>
> main() {
>
> QUrl qurl = QString("This:");
> cout << qurl.toDisplayString().toLocal8Bit().constData() << "\n";
>
> }
>
> produces:
>
> this:
>
> Something to do with the QUrl type perhaps. If I remove the trailing :
> on the string, case is preserved.
>
> Cheers,
> b.
>
I think that makes sense. QT is assuming that a colon marks the end of the
scheme part of the URI. Wikipedia says "Although schemes are
case-insensitive, the canonical form is lowercase and documents that
specify schemes must do so with lowercase letters." (
https://en.wikipedia.org/wiki/Uniform_Resource_Identifier#Syntax) I assume
that QUrl is applying encoding to the string to create a valid URL, and
when it encodes the string it puts what it thinks is the scheme part into
canonical form (i.e., lower case). I haven't looked at the full code but
maybe it it were prefixed with file: (or file://) it might behave better?
Karl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20170302/d5176a3b/attachment.html>
More information about the mythtv-users
mailing list