[PATCH] encoding fix
Robert Collins
robertc at robertcollins.net
Tue Apr 4 03:29:48 BST 2006
On Mon, 2006-03-27 at 12:51 +0200, Olaf Conradi wrote:
> === modified file 'a/bzrlib/osutils.py'
> --- a/bzrlib/osutils.py
> +++ b/bzrlib/osutils.py
> @@ -186,7 +186,7 @@
> # choke on a Unicode string containing a relative path if
> # os.getcwd() returns a non-sys.getdefaultencoding()-encoded
> # string.
> - _fs_enc = sys.getfilesystemencoding()
> + _fs_enc = sys.getfilesystemencoding() or 'ascii'
> def abspath(path):
> return os.path.abspath(path.encode(_fs_enc)).decode(_fs_enc)
>
We have multiple uses of getfilesystemencoding in bzrlib. We should
consolidate them so we dont have shotgun surgery with bugs like this.
Also, a test case is -strongly- desired - encoding issues are some of
the most pernacious bugs we encounter.
Lastly, johns encoding branch is the penultimate fix for this, I'm going
to see about getting it passing tests today.
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: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060404/471d1d9e/attachment.pgp
More information about the bazaar
mailing list