[win32] unknown terminal encoding cp65001
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
New
|
Undecided
|
Unassigned |
Bug Description
On Windows7 I can force terminal to use utf-8 by setting it `chcp 65001`. Bazaar (I guess it's underlying python actually) does not understand it:
>chcp
Active code page: 65001
>bzr st
bzr: warning: unknown terminal encoding cp65001.
Using encoding cp1251 instead.
bzr: warning: unknown terminal encoding cp65001.
Using encoding cp1251 instead.
That's because python still can't decide whether it should treat cp65001 as utf-8. http://
Related SO topic: http://
From answer http://
import codecs
codecs.
(I've tried to put this to simple plugin, but it still not work as expected, see below).
Or another way is from answer http://
> chcp 65001
> set PYTHONIOENCODIN
(This does not help either).
Also with the first trick (adjust codecs table) bzr unable to add unicode files, there is internal traceback:
Wed 2015-04-22 15:23:14 +0300
0.070 bazaar version: 2.5.1
0.070 bzr arguments: [u'add']
0.070 looking for plugins in C:\work\
0.080 looking for plugins in C:/Program Files (x86)/Bazaar/
0.080 Plugin name explorer already loaded
0.080 Plugin name fastimport already loaded
0.080 Plugin name qbzr already loaded
0.090 encoding stdout as sys.stdout encoding 'cp65001'
0.120 opening working tree 'C:/work/
0.150 skip control directory '.bzr'
0.160 Transferred: 0kB (0.0kB/s r:0kB w:0kB)
0.160 Traceback (most recent call last):
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\add.pyo", line 57, in __call__
File "bzrlib\
File "codecs.pyo", line 352, in write
IOError: [Errno 0] Error
0.170 return code 3
Without changing codecs lookup it works but does not print to console desired output, because bzr forces cp1251.
C:\work\
bzr: warning: unknown terminal encoding cp65001.
Using encoding cp1251 instead.
bzr: warning: unknown terminal encoding cp65001.
Using encoding cp1251 instead.
adding __init__.py
adding "����.txt"
Really really strange.
tags: | added: check-for-breezy |