From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: [william.xwl@gmail.com: webjump-url-encode and non-ascii characters] Date: Wed, 25 Jul 2007 09:55:25 +0900 Message-ID: References: <87sl7easqc.fsf@www.williamxu.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1185324976 18581 80.91.229.12 (25 Jul 2007 00:56:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 25 Jul 2007 00:56:16 +0000 (UTC) Cc: emacs-devel@gnu.org To: William Xu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 25 02:56:12 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IDVAf-0004WQ-Hd for ged-emacs-devel@m.gmane.org; Wed, 25 Jul 2007 02:56:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IDVAe-0003z0-St for ged-emacs-devel@m.gmane.org; Tue, 24 Jul 2007 20:56:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IDVAb-0003yn-3Z for emacs-devel@gnu.org; Tue, 24 Jul 2007 20:56:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IDVAZ-0003yO-HV for emacs-devel@gnu.org; Tue, 24 Jul 2007 20:56:04 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IDVAZ-0003yL-CR for emacs-devel@gnu.org; Tue, 24 Jul 2007 20:56:03 -0400 Original-Received: from mx1.aist.go.jp ([150.29.246.133]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IDVAY-0006RE-F1 for emacs-devel@gnu.org; Tue, 24 Jul 2007 20:56:03 -0400 Original-Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id l6P0tTv3003620; Wed, 25 Jul 2007 09:55:31 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp3.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id l6P0tSb7024800; Wed, 25 Jul 2007 09:55:28 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp3.aist.go.jp with ESMTP id l6P0tP8A029999; Wed, 25 Jul 2007 09:55:25 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken.m17n.org with local (Exim 4.67) (envelope-from ) id 1IDV9x-0008Ky-Ip; Wed, 25 Jul 2007 09:55:25 +0900 In-reply-to: <87sl7easqc.fsf@www.williamxu.com> (message from William Xu on Tue, 24 Jul 2007 21:31:07 +0900) X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.aist.go.jp id l6P0tTv3003620 X-detected-kernel: Solaris 8 (1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:75502 Archived-At: In article <87sl7easqc.fsf@www.williamxu.com>, William Xu writes: > Kenichi Handa writes: > > One more note about your change. > > > > As mapconcat accepts a sequence (including string), > > string-to-list is not necessary. > Correct, thanks ! Here's the updated patch. Ok, I installed it as a tiny change. Have you already signed the assignment paper to FSF? If so, I'll delete "(tiny change)" part. 2007-07-25 William Xu (tiny change) * net/webjump.el (webjump-url-encode): Fix for non-ASCII characters. --- Kenichi Handa handa@m17n.org > cvs diff: Diffing . > Index: webjump.el > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /sources/emacs/emacs/lisp/net/webjump.el,v > retrieving revision 1.4.6.10 > diff -u -r1.4.6.10 webjump.el > --- webjump.el 30 May 2007 14:40:32 -0000 1.4.6.10 > +++ webjump.el 24 Jul 2007 12:30:46 -0000 > @@ -451,14 +451,12 @@ =20 > (defun webjump-url-encode (str) > (mapconcat '(lambda (c) > - (cond ((=3D c 32) "+") > - ((or (and (>=3D c ?a) (<=3D c ?z)) > - (and (>=3D c ?A) (<=3D c ?Z)) > - (and (>=3D c ?0) (<=3D c ?9))) > - (char-to-string c)) > - (t (upcase (format "%%%02x" c))))) > - str > - "")) > + (let ((s (char-to-string c))) > + (cond ((string=3D s " ") "+") > + ((string-match "[a-zA-Z_.-/]" s) s) > + (t (upcase (format "%%%02x" c)))))) > + (encode-coding-string str 'utf-8) > + "")) =20 > (defun webjump-url-fix (url) > (if (webjump-null-or-blank-string-p url) > --=20 > William > =E3=80=8A=E8=9C=80=E5=85=88=E4=B8=BB=E5=BA=99=E3=80=8B > =E4=BD=9C=E8=80=85=EF=BC=9A=E5=88=98=E7=A6=B9=E9=94=A1 > =E5=A4=A9=E5=9C=B0=E8=8B=B1=E9=9B=84=E6=B0=94=EF=BC=8C=E5=8D=83=E7=A7=8B= =E5=B0=9A=E5=87=9B=E7=84=B6=E3=80=82 > =E5=8A=BF=E5=88=86=E4=B8=89=E8=B6=B3=E9=BC=8E=EF=BC=8C=E4=B8=9A=E5=A4=8D= =E4=BA=94=E9=93=A2=E9=92=B1=E3=80=82 > =E5=BE=97=E7=9B=B8=E8=83=BD=E5=BC=80=E5=9B=BD=EF=BC=8C=E7=94=9F=E5=84=BF= =E4=B8=8D=E8=B1=A1=E8=B4=A4=E3=80=82 > =E5=87=84=E5=87=89=E8=9C=80=E6=95=85=E5=A6=93=EF=BC=8C=E6=9D=A5=E8=88=9E= =E9=AD=8F=E5=AE=AB=E5=89=8D=E3=80=82 > _______________________________________________ > Emacs-devel mailing list > Emacs-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-devel