UnicodeEncodeError in _comparison_data on unrepresentable filename
Bug #77533 reported by
Ramon Diaz-Uriarte
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Low
|
Unassigned |
Bug Description
to reproduce the bug do:
- open emacs, and open an emacs shell;
- touch a file with a "weird" character; for instance touch f1.ç
- bzr status will then crash
my locale settings:
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE=
LC_MEASUREMENT=
LC_IDENTIFICATI
LC_ALL=
Under an xterm the filename shows correctly; under the emacs shell it doesn't (a \347 instead of ç)
summary: |
- bzr crashes with invalid filenames + UnicodeEncodeError in _comparison_data on unrepresentable filename |
tags: | added: unicode |
tags: | added: check-for-breezy |
tags: | removed: check-for-breezy |
To post a comment you must log in.
I can confirm that there is something that needs to be fixed. Specifically: UnicodeEncodeEr ror: 'ascii' codec can't encode character u'\xe5' in position 27: ordinal not in range(128)
$ bzr init; echo foo > "å.txt"; bzr add; bzr commit -m "added"
$ bzr status
$ LANG=C bzr status
bzr: ERROR: exceptions.
Traceback (most recent call last): jameinel/ dev/bzr/ bzr.dev/ bzrlib/ commands. py", line 650, in run_bzr_ catch_errors jameinel/ dev/bzr/ bzr.dev/ bzrlib/ commands. py", line 612, in run_bzr jameinel/ dev/bzr/ bzr.dev/ bzrlib/ commands. py", line 304, in run_argv_aliases **all_cmd_ args) jameinel/ dev/bzr/ bzr.dev/ bzrlib/ commands. py", line 622, in ignore_pipe jameinel/ dev/bzr/ bzr.dev/ bzrlib/ builtins. py", line 171, in run jameinel/ dev/bzr/ bzr.dev/ bzrlib/ status. py", line 139, in show_tree_status files=specific_ files) jameinel/ dev/bzr/ bzr.dev/ bzrlib/ tree.py" , line 87, in changes_from root=include_ root jameinel/ dev/bzr/ bzr.dev/ bzrlib/ decorators. py", line 38, in read_locked jameinel/ dev/bzr/ bzr.dev/ bzrlib/ tree.py" , line 459, in compare file_ids, include_root) jameinel/ dev/bzr/ bzr.dev/ bzrlib/ delta.py" , line 184, in _compare_trees file_ids) : jameinel/ dev/bzr/ bzr.dev/ bzrlib/ tree.py" , line 513, in _iter_changes jameinel/ dev/bzr/ bzr.dev/ bzrlib/ workingtree. py", line 1310, in _comparison_data
File "/home/
return run_bzr(argv)
File "/home/
ret = run(*run_argv)
File "/home/
return self.run(
File "/home/
result = func(*args, **kwargs)
File "/home/
short=short)
File "/home/
specific_
File "/home/
include_
File "/home/
return unbound(self, *args, **kwargs)
File "/home/
specific_
File "/home/
specific_
File "/home/
to_kind, to_executable, to_stat = \
File "/home/
stat_value = os.lstat(abspath)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe5' in position 27: ordinal not in range(128)
bzr 0.14.0dev0 on python 2.4.4.candidate.1 (linux2) jameinel/ bin/bzr' , 'st']
arguments: ['/home/
** please send this report to <email address hidden>
We are getting an error during os.lstat() because I'm guessing that abspath is trying to convert to an ascii filename.