[patch][win32] Use u'.' not '.' as hardcoded path
Robert Collins
robertc at robertcollins.net
Mon Jan 2 20:42:41 GMT 2006
On Mon, 2005-12-26 at 16:08 -0600, John A Meinel wrote:
> Actually, I think we just need to change either the Branch api, or the
> Transport one, so that any string that comes in gets converted into a
> unicode string.
>
> So we do something like this:
>
> class BzrBranch...
>
> def initialize(path):
> path = unicode(path)
> t = get_transport(path)
>
> Though really I think it would probably be best to do this in Transport.
> I'm guessing that http and sftp may need to deal differently with
> unicode strings, since they will tend to be url encoded, not strait strings.
Transport -only- deals with ascii strings - because it deals with URLs
(which are all ascii). This makes Transport relatively simple as we can
define the decoding charset ourselves (url consumers are the producers
and get to say such things).
> So LocalTransport should do something like:
> def __init__(self, base):
> """Set the base path where files will be stored."""
> if base.startswith('file://'):
> base = base[7:]
> base = unicode(base)
base = base.decode('utf8')
:)
Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060103/715f43c2/attachment.pgp
More information about the bazaar
mailing list