搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

Searching Japanese using keywords

  • 5 回覆
  • 2 有這個問題
  • 15 次檢視
  • 最近回覆由 cor-el

more options

When searching using keywords in the awesome bar, it converts any Japanese characters to their percent-encoded forms (sorry if I'm using the wrong terminology here). This is no problem for most searches, for example http://eow.alc.co.jp/search?q=%E3%81%A0%E3%81%AE and http://eow.alc.co.jp/search?q=だの both give the same result and load the same page without issue.

However, some searches (I've only noticed this with amazon.com and amazon.co.jp, but presumably it could happen on other sites) do not play nice with this conversion. For example, entering "amazon だ" ("amazon" being my amazon search key) gives me the URL http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=%3F, which instead searches for "?" for some reason. If I manually substitute だ instead of the %3F (giving http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=%E3%81%A0), it conducts the search as expected. I don't really know what's going on here (i.e., why Amazon is showing it as %3F when it should be %E3%81%A0) but hopefully someone more familiar with this can shed some light on the situation.

EDIT: I should note that non-Japanese searches work just fine. In addition, no sites (that I've tried) have had problems with Japanese searches other than Amazon.

When searching using keywords in the awesome bar, it converts any Japanese characters to their percent-encoded forms (sorry if I'm using the wrong terminology here). This is no problem for most searches, for example http://eow.alc.co.jp/search?q=%E3%81%A0%E3%81%AE and http://eow.alc.co.jp/search?q=だの both give the same result and load the same page without issue. However, some searches (I've only noticed this with amazon.com and amazon.co.jp, but presumably it could happen on other sites) do not play nice with this conversion. For example, entering "amazon だ" ("amazon" being my amazon search key) gives me the URL http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=%3F, which instead searches for "?" for some reason. If I manually substitute だ instead of the %3F (giving http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=%E3%81%A0), it conducts the search as expected. I don't really know what's going on here (i.e., why Amazon is showing it as %3F when it should be %E3%81%A0) but hopefully someone more familiar with this can shed some light on the situation. EDIT: I should note that non-Japanese searches work just fine. In addition, no sites (that I've tried) have had problems with Japanese searches other than Amazon.

由 Lyrencropt 於 修改

被選擇的解決方法

所有回覆 (5)

more options

選擇的解決方法

more options

That fixed it. Why does the capitalization matter? And why does firefox create it with a lower case s when that causes issues? I never fiddled with the url directly, I just right clicked and did "add a keyword for this search".

more options

You can read about that in the mozillaZine knowledge base article that I posted above:

Difference between (small s) %s and (Capital S) %S

1. (small s): %s will have additional substitution replacements: # by %23, % by %25, / by %2F, and @ by %40.
2. (Capital S): %S will not have substitutions and allow use of C++ in a Google search, allow use of @ in an email substitution, allow use of a fragment-id in a url substitution index.html#example2, and use of a directory as in code/example2.txt.
more options

Oops, just realized your link explained it. Thanks.

more options

Note that other searches may fail, i.e you can't search for a # and possibly other reserved characters that need escaping with a %S as replace parameter, so you may need both versions.