[rfc] Help needed: encodings problems again
Alexander Belchenko
bialix at ukr.net
Mon Jun 12 17:53:32 BST 2006
Despite that fact that encodings work is landed into bzr.dev there is
too much places in bzrlib where sys.stdout used directly and therefore
it create problems with unicode strings when output redirected via pipe
and sys.stdout hide real encoding of console.
I faced with problems in execution of command
bzr missing | less
when in revisions messages appears russian characters.
When I grep through bzrlib for 'sys.stdout' I have list of about 70
lines where sys.stdout used. And most of this lines is potentially
caused problems when output of bzr will be redirected. And this is very sad.
Fixing improper usage of sys.stdout in builtins command is very trivial,
because we have attribute self.outf in all descendant of Command class.
But I don't understand how to deal with other places that itself
unrelated to Command class.
Help needed.
Attached patch solve problems with builtins command. Attached grep
output showed lines where sys.stdout appears.
--
Alexander
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: builtins-encoding-fix.diff
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20060612/b05d240e/attachment.diff
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sys.stdout.grep
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20060612/b05d240e/attachment-0001.diff
More information about the bazaar
mailing list