From kfm-devel Fri Jun 29 05:12:01 2001 From: Yves Arrouye Date: Fri, 29 Jun 2001 05:12:01 +0000 To: kfm-devel Subject: RE: A more flexible solution for internet keywords X-MARC-Message: https://marc.info/?l=kfm-devel&m=99379168503472 > I just found a problem with the internet keywords. > If you just enter some keywords in the address bar without the prefix > ':' then the internet keyword engine should look > for these keys > (realnames). Therefore a fallback URI is passed with the query as > arguments. These arguments don't get passed correctly and the fallback > search fails. > > I made some modifications but didn't really sort out that problem. > The best I could get was a correct fallback uri, but then > konqueror asks > if I want to download and save resolver.dll from > navigation.realnames.com. > > Here's an example: > I enter "keyword1 keyword2" into the address bar, which gets > substituted > by the following link: > http://navigation.realnames.com/resolver.dll?action=navigation > &realname=keyword1%20keyword2&charset=iso-8859-1&providerid=18 > 0&fallbackuri=http%3A//www.google.com/search%3Fq%3Dkeyword1%20keyword2 > Can you have a look at this URL, if there's a mistake somewhere? > Try to put it into your konqueror. Does it bring you up a > download dialog > too? > If so, and if the URL is correct, perhaps there is somwhere another > mistake in konqueror. The URL doesn't look correct. First, I would expect to see charset=utf-8 since Keywords queries should always be sent in UTF-8 (nothing prevents you from entering a Chinese Keyword, even if your fallback of Google doesn't understand that). And then, responsecharset=iso-8859-1 for Google. Finally, the \1 in the fallbackuri should *NOT* be touched by you but passed as is to the Keywords servers. I guess it does not matter much if you encode it in the proper charset, but I'd rather keep it the way it was, were the Keywords router reencode it (this way, such reencoding is always consistent). > > > > \1 > > > > as well as > > > > \name > > > > I would like again to suggest that you make the latter > something lime > > \{name}, or at least accept that. This will make it less > error-prone for > > people to edit the templates by having clear separators. It > will also make > > let one use \{name} in the middle of something else, as in > xx\{name}yy, > > making your change more powerful. > > Yes, that's true. I didn't think of the use between normal characters. > This makes it really more powerful. > I'll implement it as soon as I've got a little more time this week. > > > > > YA > > > > PS: and I'd also suggest not using ikw as a prefix for > ikw_charset since > > this refers to the charset of the Web shortcut. OTOH, > ikw_fallbackuri is > > definitely an IKW feature; let me know if you need help > understanding the > > way this works as you said.. > > > > What do you think of the following names: > ikw ... Internet KeyWord > wsc ... Web ShortCut Sounds good to me. IKW and WSC. > \ikw_fallbackuri > \wsc_charset > \wsc_responsecharset > > But doesn't resolver.dll from realnames.com have to do with > the internet > shortcuts? That's where the charset and the responsecharset > are used... Well, that's where one sees they're tightly integrated :) What happens is the following: the charset and responecharset are part of the RealNames Keywords public interface. If you get a listing (these ugly listings nobody likes), then it will be prodiuced in the value of responsecharset. Now, when there is a fallback URI, the meaning of responsecharset is that this is the charset that the fallback URI expects for its \1 (or \0) parameter. This allows to send the query encoded in UTF-8 to the Keywords machine, but to re-encode the query for what the follow URI expects if there is no Keyword. So for example: You type something in Konqueror, and Google (charset Latin1) is your fall back. The query goes in UTF-8 to the RealNames servers, so if you type a Chinese Keyword it works. If there is no such Keyword, the query is reencoded in Latin1 before being handed off tp Google. If the reencoding didn't happen, and you typed my keyword, Ladédé, with some extra chars, as in "Que fait Ladédé cet été?" then Google will get a UTF-8 query, thinking it's Latin1, and will get all confused. So I would just use \wsc_charset for a name, and the fallback URI would have responsecharset=\wsc_charset in it if you want, instead of the \3 it has now. > I'd volunteer to do so, but I'd need some assistance to do it right. > Could you provide me an overview about how all this works together? Is the above detailed enough? YA