`bzr --version` should care about encoding of stdout

Bug #131100 reported by Alexander Belchenko
2
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Alexander Belchenko

Bug Description

Windows users, who use localized version, often have My Document folder name translated to their languages. Because bzr use My Documents folder to place there .bzr.log, so sometimes abspath to .bzr.log may contains non-ascii characters. Therefore command

C:> bzr --version | less

Is fails with UnicodeEncodeError.

E:\Bazaar\mydev\bzr.dev>python bzr --version |less
bzr: ERROR: exceptions.UnicodeEncodeError: 'ascii' codec can't encode characters in position 3-5: ordinal not in range(128)

Traceback (most recent call last):
  File "E:\Bazaar\mydev\bzr.dev\bzrlib\commands.py", line 817, in run_bzr_catch_errors
    return run_bzr(argv)
  File "E:\Bazaar\mydev\bzr.dev\bzrlib\commands.py", line 746, in run_bzr
    show_version()
  File "E:\Bazaar\mydev\bzr.dev\bzrlib\version.py", line 55, in show_version
    print " Bazaar log file:", trace._bzr_log_filename
UnicodeEncodeError: 'ascii' codec can't encode characters in position 3-5: ordinal not in range(128)

bzr 0.19.0dev0 on python 2.4.4.final.0 (win32)
arguments: ['bzr', '--version']

Function show_versoin should take care about encoding of stdout. Currently it just print data. It's unicode unsafe.

Tags: win32
Changed in bzr:
status: New → Confirmed
Revision history for this message
Aaron Bentley (abentley) wrote :

This does not give a good first impression

Changed in bzr:
importance: Undecided → Medium
Changed in bzr:
assignee: nobody → bialix
status: Confirmed → In Progress
Revision history for this message
Alexander Belchenko (bialix) wrote :

merged to bzr.dev

Changed in bzr:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.