Jump to content

The search engine box convert keywords to UTF-8 url only?


wsz123

Recommended Posts

Posted

There are some search engines do not accept utf-8 parameters in url, especially non-English language countries' sites.

For example, like this one:

http://search.btchina.net/btsearch.php?query=

If you typed "全集" in the search engine box and press enter then, the keyword was about to be converted to this in url:

http://search.btchina.net/btsearch.php?query=%E5%85%A8%E9%9B%86

As a result the keyword was recognized as some other chinese characters "鍏ㄩ泦" by the site, but actually the correct url should be:

http://search.btchina.net/btsearch.php?query=%C8%AB%BC%AF

So, maybe there should be some parameters which can tell the program how to convert the keyword typed in search engine box to the url, for example like these:

s% - just send what you typed in the box to the url

u% - UTF-8 conversion (now this is default)

a% - ASCII style conversion

U% - Unicode conversion

...and so on.

Thus, we take a format like this to add a search engine:

BTChina|http://search.btchina.net/btsearch.php?query=a%

or

BTChina|http://search.btchina.net/btsearch.php?query=s%

(the second one convert url to http://search.btchina.net/btsearch.php?query=全集)

Posted

Thanks for reply :)

If we got these paramters we can customize a search engine like this

BTChina|http://search.btchina.net/btsearch.php?query=a%&type=0

so the extra parameters can be appended after the keywords.

BTW: I was supposed to find an answer in help file before this thread is posted here, but after many 404 came out I found that the help file's url seems dead now……

Posted

@wsz123: %s is already implemented in µTorrent for inserting the query in arbitrary locations in the URL. %v gets parsed as the client user agent ID. The only new thing would be to allow user-specified encoding conversions depending on the parameter letter used :P

Regarding the help file... are you referring to the user manual? What's showing up as a 404, the the CHM contents, or the link to the ZIP containing the CHM?

Posted

I just tried %s, it dose works, although a small problem there is maybe:

Google|http://www.google.com/search?q=%s&as_qdr=m3

This came out an url:

http://search.utorrent.com/search.php?q=%e5%85%a8%e9%9b%86&e=http%3a%2f%2fwww.google.com%2fsearch%3fq%3d%25s%26as_qdr%3dm3&u=1

The result in my browser is correct, just the converted url get me a little confused (too much %... @_@) :P

So... I am glad that the 404 is my ISP's problem, maybe the DNS server was messed up or something, it just came out when I was trying to download the utorrent-help.zip last night, and finally I got this ZIP through a proxy. :D

Posted

The % encoding occurs because the URL is passed through search.utorrent.com by default, as you can see. If you don't like that, you can always set gui.bypass_search_redirect to true.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...