From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: [davidsmith@acm.org: [patch] url-hexify-string does not follow W3C spec] Date: Sun, 30 Jul 2006 09:14:25 -0400 Message-ID: Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1154265285 9209 80.91.229.2 (30 Jul 2006 13:14:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 30 Jul 2006 13:14:45 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 30 15:14:42 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 1G7B7u-0001ss-EG for ged-emacs-devel@m.gmane.org; Sun, 30 Jul 2006 15:14:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G7B7t-00043F-RU for ged-emacs-devel@m.gmane.org; Sun, 30 Jul 2006 09:14:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G7B7j-000436-DK for emacs-devel@gnu.org; Sun, 30 Jul 2006 09:14:27 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G7B7i-00041X-JX for emacs-devel@gnu.org; Sun, 30 Jul 2006 09:14:26 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G7B7i-00041H-FM for emacs-devel@gnu.org; Sun, 30 Jul 2006 09:14:26 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1G7BAA-00074t-1i for emacs-devel@gnu.org; Sun, 30 Jul 2006 09:16:58 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1G7B7h-0001IY-L6; Sun, 30 Jul 2006 09:14:25 -0400 Original-To: emacs-devel@gnu.org 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:57806 Archived-At: Would someone please DTRT? ------- Start of forwarded message ------- From: "David Smith" To: emacs-pretest-bug@gnu.org Date: Sun, 30 Jul 2006 05:29:50 +0900 MIME-Version: 1.0 Subject: [patch] url-hexify-string does not follow W3C spec Content-Type: multipart/mixed; boundary="===============1391979861==" X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed version=3.0.4 - --===============1391979861== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" - --=-=-= Content-Transfer-Encoding: quoted-printable url-hexify-string does not handle non-latin characters. According to http://www.w3.org/International/O-URL-code.html , the string must be converted to hexadecimal UTF-8 and every hexadecimal byte must be prefixed with a % character. Rewritten url-hexify-string is below: (defun url-hexify-string (str) "Escape characters in a string." (mapconcat (lambda (char) ;; Fixme: use a char table instead. (if (not (memq char url-unreserved-chars)) (if (< char 16) (format "%%0%x" char) (let ((ins nil)) (mapconcat=20 (lambda (charhex) (progn (setq ins (not ins)) (if ins (concat "%" (char-to-string charhex)) (char-to-string charhex)))) (format "%x" char) ""))) (char-to-string char))) (encode-coding-string str 'utf-8) "")) Important settings: value of $LC_ALL: ja_JP.utf8 value of $LC_COLLATE: nil value of $LC_CTYPE: ja_JP.utf8 value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: ja_JP locale-coding-system: utf-8-unix default-enable-multibyte-characters: t Thanks, =2D-=20 David D. Smith - --=-=-= Content-Type: application/pgp-signature - -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) iD8DBQFEy8VGEJGOueZRHH4RAmWmAJ9JMak1qheySPaTp6jaqsaxovHjgACgkFO+ zbUH6GB4KFjR8Li2EjWH4Ck= =jmDi - -----END PGP SIGNATURE----- - --=-=-=-- - --===============1391979861== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug - --===============1391979861==-- ------- End of forwarded message -------