From: Richard Stallman <rms@gnu.org>
Subject: [davidsmith@acm.org: [patch] url-hexify-string does not follow W3C spec]
Date: Sun, 30 Jul 2006 09:14:25 -0400 [thread overview]
Message-ID: <E1G7B7h-0001IY-L6@fencepost.gnu.org> (raw)
Would someone please DTRT?
------- Start of forwarded message -------
From: "David Smith" <davidsmith@acm.org>
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 -------
next reply other threads:[~2006-07-30 13:14 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-30 13:14 Richard Stallman [this message]
2006-07-30 20:24 ` [davidsmith@acm.org: [patch] url-hexify-string does not follow W3C spec] Thien-Thi Nguyen
2006-07-31 0:59 ` YAMAMOTO Mitsuharu
2006-07-31 10:13 ` Thien-Thi Nguyen
2006-07-31 10:46 ` Jason Rumney
2006-07-31 16:08 ` Stefan Monnier
2006-07-31 16:35 ` David Smith
2006-07-31 20:49 ` Thien-Thi Nguyen
2006-08-01 3:55 ` YAMAMOTO Mitsuharu
2006-08-01 4:20 ` Stefan Monnier
2006-08-01 4:34 ` YAMAMOTO Mitsuharu
2006-08-01 6:50 ` Stefan Monnier
2006-08-01 7:14 ` Kenichi Handa
2006-08-01 14:32 ` Stefan Monnier
2006-08-01 8:42 ` Jason Rumney
2006-08-01 14:47 ` Thien-Thi Nguyen
2006-08-01 15:10 ` Stefan Monnier
2006-08-01 15:14 ` David Kastrup
2006-08-01 15:54 ` Stefan Monnier
2006-08-01 16:07 ` David Kastrup
2006-08-09 3:48 ` Kenichi Handa
2006-08-02 2:06 ` YAMAMOTO Mitsuharu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1G7B7h-0001IY-L6@fencepost.gnu.org \
--to=rms@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).