unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Jason Rumney <jasonr@gnu.org>
Cc: davidsmith@acm.org,
	YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>,
	emacs-devel@gnu.org
Subject: Re: [davidsmith@acm.org: [patch] url-hexify-string does not	follow W3C spec]
Date: Mon, 31 Jul 2006 11:46:18 +0100	[thread overview]
Message-ID: <44CDDF7A.8060404@gnu.org> (raw)
In-Reply-To: <jk7j1u6q0a.fsf@glug.org>


[-- Attachment #1.1: Type: text/plain, Size: 1465 bytes --]

Thien-Thi Nguyen wrote:
> YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 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.
>   
There is a recent RFC that mandates utf-8 encoding for URIs, but 
previous RFCs either said nothing, or specified Latin-1, so there are 
many implementations that do not use utf-8. We need some way to 
interoperate with such implementations.

> 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.
>   
Alternatively, we could add an optional arg ENCODING, for specifying an 
encoding other than utf-8. That might be a cleaner interface than 
requiring the user to make the string unibyte before passing it to 
url-hexify-string.


[-- Attachment #1.2: Type: text/html, Size: 2073 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

  reply	other threads:[~2006-07-31 10:46 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-30 13:14 [davidsmith@acm.org: [patch] url-hexify-string does not follow W3C spec] Richard Stallman
2006-07-30 20:24 ` 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 [this message]
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=44CDDF7A.8060404@gnu.org \
    --to=jasonr@gnu.org \
    --cc=davidsmith@acm.org \
    --cc=emacs-devel@gnu.org \
    --cc=mituharu@math.s.chiba-u.ac.jp \
    /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).