Code review comment for lp:~gz/bzr/setlocale_on_posix_only_631350

Revision history for this message
Alexander Belchenko (bialix) wrote :

Gary van der Merwe пишет:
> I built a installer based on this branch: http://dl.dropbox.com/u/4494367/bzr-2.2.0-setup.exe
>
> I was not able to go through the test case given in the bug, as I was not able to paste the unicode string into the console. So I created a branch on linux, and pulled it. The results were not good.
>
> C:\Users\Gary\test>bzr pull sftp://garyvdm@192.168.1.152/home/garyvdm/test_unicode
> Connected (version 2.0, client OpenSSH_5.3p1)
> Authentication (publickey) failed.
> SSH garyvdm@192.168.1.152 password:
> Authentication (password) successful!
> Secsh channel 1 opened.
> [chan 1] Opened sftp connection (server version 3)
> +N ????/
> All changes applied successfully.
> Now on revision 1.
>
> C:\Users\Gary\test>bzr log
> ------------------------------------------------------------
> revno: 1
> committer: Gary van der Merwe <email address hidden>
> branch nick: test_unicode
> timestamp: Tue 2010-09-07 21:05:39 +0200
> message:
> ????

I think these two related to the fact your OEM encoding (cp437 as I
see) is not able to print Russian characters, and because we're using
encode(xxx, replace) those characters became question marks.

> C:\Users\Gary\test>bzr ls
> bzr: ERROR: exceptions.UnicodeEncodeError: 'charmap' codec can't encode characte
> rs in position 0-3: character maps to <undefined>
>
> Traceback (most recent call last):
> File "bzrlib\commands.pyo", line 912, in exception_to_return_code
> File "bzrlib\commands.pyo", line 1112, in run_bzr
> File "bzrlib\commands.pyo", line 690, in run_argv_aliases
> File "bzrlib\commands.pyo", line 705, in run
> File "bzrlib\cleanup.pyo", line 135, in run_simple
> File "bzrlib\cleanup.pyo", line 165, in _do_with_cleanups
> File "bzrlib\commands.pyo", line 1127, in ignore_pipe
> File "bzrlib\builtins.pyo", line 2613, in run
> File "bzrlib\ui\text.pyo", line 538, in write
> File "codecs.pyo", line 351, in write
> File "encodings\cp437.pyo", line 12, in encode
> UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-3: cha
> racter maps to <undefined>

I think this is separate unicode bug, maybe ls command using
encode(xxx, errors) and therefore crashed with traceback.

> bzr 2.2.0 on python 2.6.4 (Windows-post2008Server-6.1.7600)
> arguments: ['bzr', 'ls']
> encoding: 'cp1252', fsenc: 'mbcs', lang: None

Especially because your console is non-russsian capable one.

> I don't know if I'm ment to configure anything to make this work. I also guess that the ls error is maybe a different bug.

You can try running this command in the console first:

chcp 866

and then try again. Also it worth to change settings of the console to
use Lucida Console font (it better works with unicode).

--
All the dude wanted was his rug back

« Back to merge proposal