[MERGE][#139318] bzr send @ win32: ensure that command line to invoking Thunderbird is 8-bit string, not unicode (because subprocess does not understand non-ascii unicode)
aaron at aaronbentley.com
Tue Feb 26 13:50:13 GMT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Alexander Belchenko wrote:
> This patch fixes problem with UnicodeEncodeError and subprocess module @
According to my tests, both the encoded and unicode forms are allowed on
Linux. So we can encode on all platforms, which should give your change
better test coverage.
Also, please include a test case.
> Actually I need this fix only for Thunderbird, default MapiClient is not
> by unicode bug. So if someone think that subject.encode(user_encdoing,
> should be only in Thunderbird class, I'll move it there.
Actually, it looks like we need to encode all arguments that may be
provided, so I think the right place would be in
cmdline = [a.encode(user_encoding, 'replace') for a in cmdline]
If you do it there, it's pretty hard to test, so I wouldn't require it.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the bazaar