[BUNDLE] Make additional chance to obtain right encoding of console when output piped

Aaron Bentley aaron.bentley at utoronto.ca
Sat Jun 10 17:50:45 BST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Collins wrote:
>>>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.

It's interesting to consider this behaviour in the context of the recent
CRLF bug for bundles.  (That is, Windows produces invalid bundles
because its stdout is in text mode.)

Presumably, the pipe behaviour is the same as the redirect behaviour.
Which suggests that for bundles, we'd want to use utf-8 and force
UNIX-style newlines when there was no stdout encoding.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEivhk0F+nu1YWqI0RAuVuAJ4ruSEX3vc+8yATf67e7Uksj2fy3QCfUViD
oJ6akxjwUIqLu8dmYC1szBw=
=jbSJ
-----END PGP SIGNATURE-----




More information about the bazaar mailing list