From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.devel Subject: Re: [davidsmith@acm.org: [patch] url-hexify-string does not follow W3C spec] Date: 31 Jul 2006 16:49:19 -0400 Message-ID: References: <44CDDF7A.8060404@gnu.org> <87lkq9ivgf.fsf@acm.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1154379002 24286 80.91.229.2 (31 Jul 2006 20:50:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 31 Jul 2006 20:50:02 +0000 (UTC) Cc: Jason Rumney , Stefan Monnier , YAMAMOTO Mitsuharu , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 31 22:49:59 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G7ehp-0005lE-68 for ged-emacs-devel@m.gmane.org; Mon, 31 Jul 2006 22:49:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G7eho-0000N5-Mw for ged-emacs-devel@m.gmane.org; Mon, 31 Jul 2006 16:49:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G7ehc-0000MS-HD for emacs-devel@gnu.org; Mon, 31 Jul 2006 16:49:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G7eha-0000Lg-Uc for emacs-devel@gnu.org; Mon, 31 Jul 2006 16:49:28 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G7eha-0000Ld-P0 for emacs-devel@gnu.org; Mon, 31 Jul 2006 16:49:26 -0400 Original-Received: from [67.59.132.6] (helo=mail.agora-net.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1G7ekJ-0008Av-6v; Mon, 31 Jul 2006 16:52:15 -0400 Original-Received: from ttn by mail.agora-net.com with local (Exim 4.50) id 1G7ehT-0000wn-Cq; Mon, 31 Jul 2006 16:49:19 -0400 Original-To: "David Smith" In-Reply-To: <87lkq9ivgf.fsf@acm.org> Original-Lines: 29 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 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:57875 Archived-At: "David Smith" writes: > Nguyen, is this as easy to implement as it sounds? i don't know how easy it sounds. that depends on each listener. to me, it seems very easy to implement, because it is already done. here is the function as it stands in lisp/url/url-util.el: (defun url-hexify-string (string) "Return a new string that is STRING URI-encoded. First, STRING is converted to utf-8, if necessary. Then, for each character in the utf-8 string, those found in `url-unreserved-chars' are left as-is, all others are represented as a three-character string: \"%\" followed by two lowercase hex digits." (mapconcat (lambda (char) (if (memq char url-unreserved-chars) (char-to-string char) (format "%%%02x" char))) (encode-coding-string string 'utf-8 t) "")) i suggest we leave it alone. btw, i missed some of this thread so i assume "it" refers to `url-hexify-string'. if discussion is actually about some other function (that calls `url-hexify-string'), i have no opinion on those matters. thi