unicode command line options cause unicodeencodeerror traceback
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Medium
|
Rory Yorke |
Bug Description
Bazaar gives a traceback if a unicode character is given in a command option:
mbp@grace% ./bzr st -ة
bzr: ERROR: exceptions.
Traceback (most recent call last):
File "/home/
return run_bzr(argv)
File "/home/
ret = run(*run_argv)
File "/home/
args, opts = parse_args(self, argv, alias_argv)
File "/home/
options, args = parser.
File "optparse.py", line 1380, in parse_args
self.
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0629' in position 17: ordinal not in range(128)
This is similar to bug 57123, but probably recurring because we have switched to using optparse since that commit was merged. Unlike that bug, this only happens with options, not command names.
Related branches
- Martin Packman (community): Approve
-
Diff: 52 lines (+20/-1)3 files modifiedbzrlib/commands.py (+7/-1)
bzrlib/tests/blackbox/test_exceptions.py (+11/-0)
doc/en/release-notes/bzr-2.3.txt (+2/-0)
- Vincent Ladeuil: Approve
-
Diff: 31 lines (+4/-4)2 files modifiedbzrlib/lazy_regex.py (+3/-3)
doc/en/release-notes/bzr-2.7.txt (+1/-1)
Changed in bzr: | |
importance: | Undecided → Low |
status: | New → Triaged |
Changed in bzr: | |
assignee: | nobody → Rory Yorke (ryorke) |
status: | Confirmed → In Progress |
Changed in bzr: | |
milestone: | none → 2.3b4 |
Changed in bzr: | |
status: | In Progress → Fix Released |
Test user <email address hidden> <email address hidden>