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 06:13:41 -0400 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1154340900 21705 80.91.229.2 (31 Jul 2006 10:15:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 31 Jul 2006 10:15:00 +0000 (UTC) Cc: davidsmith@acm.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 31 12:14:56 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 1G7UnS-00027r-7K for ged-emacs-devel@m.gmane.org; Mon, 31 Jul 2006 12:14:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G7UnR-0005hY-IX for ged-emacs-devel@m.gmane.org; Mon, 31 Jul 2006 06:14:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G7UmQ-0004iI-CP for emacs-devel@gnu.org; Mon, 31 Jul 2006 06:13:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G7UmO-0004h5-Kj for emacs-devel@gnu.org; Mon, 31 Jul 2006 06:13:45 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G7UmO-0004gu-Hc for emacs-devel@gnu.org; Mon, 31 Jul 2006 06:13:44 -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 1G7Up2-0003O3-94 for emacs-devel@gnu.org; Mon, 31 Jul 2006 06:16:28 -0400 Original-Received: from ttn by mail.agora-net.com with local (Exim 4.50) id 1G7UmL-0007hf-6r; Mon, 31 Jul 2006 06:13:41 -0400 Original-To: YAMAMOTO Mitsuharu In-Reply-To: Original-Lines: 31 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:57841 Archived-At: YAMAMOTO Mitsuharu writes: > This change breaks the following case: > > (concat > "file://localhost" > (mapconcat 'url-hexify-string > (split-string > (encode-coding-string "/SOME/NONASCII/FILE/NAME" > (or file-name-coding-system > default-file-name-coding-system)) > "/") > "/")) > > Maybe suppress encoding with UTF-8 for unibyte strings? if the result of this expression is to be used as a URI, then that means the change exposes improper use of `url-hexify-string'; according to the RFC (as i understand it) URIs require utf-8. if we want `url-hexify-string' to handle "URI-like" transformations (i.e., not strictly produce URI-conformant results), we can add an optional arg MAKE-UNIBYTE that specifies a function to do the conversion to unibyte. in most cases, i guess that would be `string-as-unibyte', but i don't know for sure. so i suppose it comes down to the question: is this case supposed to produce a valid URI? if so, we should fix the call and not the called. thi