"Using Saved Location: foo"
Jan Hudec
bulb at ucw.cz
Tue May 2 06:18:00 BST 2006
On Tue, May 02, 2006 at 13:24:45 +1000, Martin Pool wrote:
> On 02/05/2006, at 1:21 AM, John Arbash Meinel wrote:
> >Maybe a more obvious one would be:
> >sftp://host/path/to/bzr/b??gfors
>
> Yes, I agree -- that's what I was trying to communicate before.
>
> >versus
> >sftp://host/path/to/bzr/b%C3%A5gfors
> >
> >I think if the "url" is unicode, there still is no ambiguity. We
> >know if
> >a path is a URL because of the prefix. As long as we only escape
> >Unicode
> >that cannot be converted to ascii, I think we would be okay.
> >
> >So something like:
> >if unicode:
> > split on '/':
> > try:
> > chunk = chunk.encode('ascii')
> > except UnicodeEncodeError:
> > chunk = urlescape(chunk)
>
> Actually it's going to be
>
> chunk = urlescape(chunk.encode('utf-8'))
Well, with a twist. The input url is actually 'encoded', so urlescape
must not escape % in this case.
--
Jan 'Bulb' Hudec <bulb at ucw.cz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060502/1661aa01/attachment.pgp
More information about the bazaar
mailing list