This forum has been archived. All content is frozen. Please use KDE Discuss instead.

percent encoding in web shortcuts

Tags: None
(comma "," separated)
User avatar
urwald
Registered Member
Posts
30
Karma
0
OS

percent encoding in web shortcuts

Thu Aug 13, 2009 10:23 am
Hello.

I want to provide web shortbuts for Konqueror/KRunner (like gg:word) for some online dictionaries.

Several of these online dictionaries expect the search data to be in percent encoding (URL encoding). For example, to search for Kübel in the Duden, the parameter is expected in the form K%FCbel. If it is not encoded, the request will not work. (http://www.duden-suche.de/suche/treffer ... 25&x=0&y=0)

How can I create such a shortcut? In the address field, \{@} and \{0} seem to provide alwasy the unencoded value. And in the charactersets that are available, I didn't found one that provides percent encoding.


urwald, proud to be a member of KDE forums since 2008-Oct.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
I believe that KIO automatically translates them to percent characters as needed. It also does this for spaces, etc.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
urwald
Registered Member
Posts
30
Karma
0
OS
Hm. I've tried it with both entering the new shortcut ("test:Kübel") directly in Konqueror and using the shortcut in KRunner (calling Firefox, which is my default browser).

In both cases, the URL that is called is:

http://www.duden-suche.de/suche/trefferliste.php?suchbegriff[AND]=Kübel&suche=homepage&treffer_pro_seite=10&modus=title&level=125&x=0&y=0

And this contains Kübel and not K%FCbel.

The value is definitively not in percent encoding in the URL.


urwald, proud to be a member of KDE forums since 2008-Oct.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: percent encoding in web shortcuts

Fri Aug 14, 2009 11:15 pm
Konqueror displays an unencoded version of the url in its address bar. Does the website behave correctly?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
urwald
Registered Member
Posts
30
Karma
0
OS
No, it doesn't.

The example is a German dictionary. It doesn't find the corresponding entry when the URL isn't encoded.


urwald, proud to be a member of KDE forums since 2008-Oct.
User avatar
Ignacio Serantes
Registered Member
Posts
453
Karma
1
OS

Re: percent encoding in web shortcuts

Sat Aug 15, 2009 12:21 pm
There is a bug reported by me several months ago about web shorcuts and encoding, https://bugs.kde.org/show_bug.cgi?id=182934, and I seems to be related to your problem. In Qt 4 encoding system is not compatible with Qt 3 so several KDE 4 are broken and I think that it was be broken for a long time or not fixed, as Thiago Macieira explain in bugs.kde.org.

KDE 4 seems to be a desktop developed only for english users.

The best thing you can do is report this bug in bugs.kde.org and still use Konqueror 3.


Ignacio Serantes, proud to be a member of KDE forums since 2008-Nov.
User avatar
urwald
Registered Member
Posts
30
Karma
0
OS
Okay. I'll subscribe in this bug...

Thanks.


urwald, proud to be a member of KDE forums since 2008-Oct.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]