[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs-W3m bug
"Lazycat Manatee" <lazycat.manatee@xxxxxxxxx> writes:
> Hi.
> I'm use Emacs-W3m (1.5) in Emacs (23.0.60.2).
> Blow is my function about search in Google Blog.
>
> (defun w3m-search-google-blog (what)
> "Use Google blog search for WHAT."
> (interactive "sGoogle Blog: ")
> (w3m-goto-url-new-session (concat
> "http://blogsearch.google.cn/blogsearch?hl=zh-CN&ie=UTF-8&q="
> (w3m-url-encode-string what 'utf-8))))
>
> If I use "w3m-search-google-blog" search "$B1|$(Da=$B2q(B",
> so the coding of first page of Google search result is right(ie=UTF-8),
> but the coding of second page of Google search result is wrong
> (automatic change to ie=GB2312).
Maybe it is google's fault. I found a way to solve this: search with
"oe=UTF-8" option. Below is the fixed function.
(defun w3m-search-google-blog (what)
"Use Google blog search for WHAT."
(interactive "sGoogle Blog: ")
(w3m-goto-url-new-session (concat
"http://blogsearch.google.com/blogsearch?hl=zh-CN&ie=UTF-8&oe=UTF-8&q="
(w3m-url-encode-string what 'utf-8))))
--
Naohiro Aota