[BUNDLE] Make additional chance to obtain right encoding of console when output piped
Wouter van Heyst
larstiq at larstiq.dyndns.org
Fri Jun 9 21:56:23 BST 2006
On Fri, Jun 09, 2006 at 07:57:49PM +0300, Alexander Belchenko wrote:
> I wrote about this fact before: when output of bzr command piped to
> another program, i.e. when run something like:
>
> bzr log | less
>
> Then sys.stdout lose their own encoding attribute value and bzr switch
> to use bzrlib.user_encoding value. That behaviour on some system is
> inappropriate, see bug 5041 as example.
>
> But when only stdout piped out then stdin is not touched and behaves
> normally. So bzr should try to use information from sys.stdin.encoding
> to detect *right* encoding of console.
This doesn't seem enough for 'bzr pull | less' though.
bzr: ERROR: exceptions.TypeError: encode() argument 1 must be string, not None
at /home/larstiq/src/bzr/bzr.dev/bzrlib/urlutils.py line 468
in unescape_for_display
Wouter van Heyst
More information about the bazaar
mailing list