[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
I found a solution method about Chinese keyword highlight in Google.
- From: Andy Stewart <lazycat.manatee@xxxxxxxxx>
- Date: Tue, 3 Jun 2008 01:37:32 +0800
- X-ml-name: emacs-w3m
- X-mail-count: 10196
Hi, all.
About Chinese keyword can't highlight in Google search pages correctly.
I found a simply solution method to repair (in fact, is steer clear of) this problem, and
enlightenment by EmacsWiki Google Custom search.
So i modify my search function about www.google.cn,
(defun w3m-search-google-chinese (what)
"Use google to search for WHAT that write in Chinese."
(interactive "sGoogle Search (chinese): ")
;; (w3m-goto-url-new-session (concat
"http://www.google.cn/search?&hl=zh-CN&lr=lang_zh-CN%7Clang_zh-TW&inlang=zh-CN&q=" ;; This is original version
(w3m-goto-url-new-session (concat
"http://www.google.cn/custom?hl=zh-CN&lr=lang_zh-CN%7Clang_zh-TW&inlang=zh-CN&ie=UTF-8&oe=UTF-8&q="
;; This is current version, change "search" to "custom" and adjust I/O coding.
(w3m-url-encode-string what))))
(defun w3m-search-google-cn (what)
"Use google china to search for WHAT."
(interactive "sGoogle Search (CN): ")
;; (w3m-goto-url-new-session (concat "http://www.google.cn/search?q=" ;; This is original version
(w3m-goto-url-new-session (concat "http://www.google.cn/custom?q=" ;; This is current
version, change "search" to "custom"
(w3m-url-encode-string what))))
Now i can search in www.google.cn correctly.
But i still want to ask, if don't change "search" to "custom", have another better solution?
Example add a patch for www.google.cn.
Thank you very much! ^_^