Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
*Backtrace*(2004-04-22)
[go: Go Back, main page]

書いてる人: 高橋カヲル | [mixi] | [PGP] | [TETRiS DS] | [portscout] | [RSS]

トップ «前の日記(2004-04-21) 最新 次の日記(2004-04-23)» 編集

*Backtrace*

1999|12|
2000|01|02|03|04|05|06|07|08|09|10|11|12|
2001|01|02|03|04|05|06|07|08|09|10|11|12|
2002|01|02|03|04|05|06|07|08|09|10|11|12|
2003|01|02|03|04|05|06|07|08|09|10|11|12|
2004|01|02|03|04|05|06|07|08|09|10|11|12|
2005|01|02|03|04|05|06|07|08|09|10|11|12|
2006|01|02|03|04|05|06|07|08|09|10|11|12|
2007|01|02|03|04|05|06|07|08|09|10|11|12|
2008|01|

2004-04-22

_ google

なんか UTF-8 前提になってる?とりあえず手元の M-x google 環境をなおす。

(require 'browse-url)
(defun google-encoding (str)
  (require 'un-define)
  (setq str (encode-coding-string str 'utf-8))
  (let* ((len (length str))
	 (ret (make-string (* len 3) ?a))
	 (i 0) (j 0) char type)
    (while (< i len)
      (setq char (aref str i))
      (if (< char 126)
	  (aset ret j char)
	(aset ret j ?%)
	(setq j (1+ j))
	(aset ret j (aref "0123456789ABCDEF" (lsh char -4)))
	(setq j (1+ j))
	(aset ret j (aref "0123456789ABCDEF" (logand char 15))))
      (setq i (1+ i) j (1+ j)))
    (substring ret 0 j)))
;;;###autoload
(defun google (str)
  (interactive "sGoogle keyword: ")
  (browse-url
   (concat
    "http://www.google.com/search?q="
    (google-encoding str)
    "&hl;=ja&lr;=lang_ja")))
(provide 'google)
お名前:
E-mail:
コメント:
本日のリンク元
その他のリンク元
検索

トップ «前の日記(2004-04-21) 最新 次の日記(2004-04-23)» 編集

謎 queue & status

Powered by 早起き生活
[Powered by OpenBSD] [Powered by たん清] [やる気のないサイト] Valid HTML 4.01 Strict Page Rank Checker [VALID RSS!] RSS feed meter for http://triaez.kaisei.org/~kaoru/diary/