user_encoding fix
Nir Soffer
nirs at freeshell.org
Mon Feb 20 09:29:09 GMT 2006
On 19/02/2006, at 22:39, Alexander Belchenko wrote:
>> On Fri, Feb 17, 2006 at 10:28:44AM +0200, Nir Soffer wrote:
>>> I made another small fix, using always bzrlib.user_encoding for outf
>>> - the previous code used sys.stdout.encoding, which is ASCII here
>>> (on 10.3).
>> Could this give problems with systems where multiple encodings are
>> used,
>> like Alexanders?
>
> Exactly. Using always bzrlib.user_encoding instead of
> sys.stdout.encoding if it present will break windows compatibility (as
> I explain earlier, russian windows have sys.stdout.encoding == 'cp866'
> and bzrlib.user_encoding is 'cp1251').
So on Windows it should use sys.stdout.encoding, but on Mac OS X it
should use user_encoding. What is the correct check for windows in
this case? os.name == nt or sys.platform?
Since its another os specific issue, maybe move it into osutils?
Best Regards,
Nir Soffer
More information about the bazaar
mailing list