unicode handling problem
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar Keywords Plugin |
Triaged
|
High
|
Unassigned |
Bug Description
It seems that there is a problem with files with utf-8 content.
D:\web\
bzr: ERROR: exceptions.
Traceback (most recent call last):
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "C:/Users/
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "C:/Users/
File "C:/Users/
File "C:/Users/
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 359: ordinal not in range(128)
bzr 2.0.0 on python 2.5.4 (Windows-32bit-SP1)
arguments: ['bzr', 'export', '--keywords=
encoding: 'cp1251', fsenc: 'mbcs', lang: None
plugins:
bzrtools C:\Program Files\Bazaar\
explorer C:\Program Files\Bazaar\
keywords C:\Users\
launchpad C:\Program Files\Bazaar\
netrc_
qbzr C:\Program Files\Bazaar\
rebase C:\Program Files\Bazaar\
svn C:\Program Files\Bazaar\
upload C:\Program Files\Bazaar\
xmloutput C:\Program Files\Bazaar\
*** Bazaar has encountered an internal error. This probably indicates a
bug in Bazaar. You can help us fix it by filing a bug report at
https:/
including this traceback and a description of the problem.
Changed in bzr-keywords: | |
status: | New → Triaged |
importance: | Undecided → High |
summary: |
- keywords - unicode handling problem + unicode handling problem |
I also have the same issue. It seems to be able to handle some files but not others.
To reproduce, I created a file with the following contents:
// $Filename$
®
I added this to a test repository and committed. Then ran the following:
bzr export --filters /bzr/temp/export ./
OR
bzr cat --filters testfile.cpp
Both end up with the following error:
bzr: ERROR: exceptions. UnicodeDecodeEr ror: 'ascii' codec can't decode byte 0xae in position 2: ordinal not in range(128)
Traceback (most recent call last): python2. 6/site- packages/ bzrlib/ commands. py", line 927, in exception_ to_return_ code python2. 6/site- packages/ bzrlib/ commands. py", line 1127, in run_bzr python2. 6/site- packages/ bzrlib/ commands. py", line 692, in run_argv_aliases **all_cmd_ args) python2. 6/site- packages/ bzrlib/ commands. py", line 714, in run .run_simple( *args, **kwargs) python2. 6/site- packages/ bzrlib/ cleanup. py", line 135, in run_simple python2. 6/site- packages/ bzrlib/ cleanup. py", line 165, in _do_with_cleanups python2. 6/site- packages/ bzrlib/ plugins/ keywords/ __init_ _.py", line 223, in run python2. 6/site- packages/ bzrlib/ builtins. py", line 2893, in run file_timestamps =per_file_ timestamps) python2. 6/site- packages/ bzrlib/ export/ __init_ _.py", line 109, in export file_timestamps =per_file_ timestamps) python2. 6/site- packages/ bzrlib/ export/ __init_ _.py", line 63, in _loader file_timestamps =per_file_ timestamps) python2. 6/site- packages/ bzrlib/ export/ dir_exporter. py", line 84, in dir_exporter output_ bytes(chunks, filters, context) python2. 6/site- packages/ bzrlib/ filters/ __init_ _.py", line 170, in filtered_ output_ bytes writer( chunks, context) python2. 6/site- packages/ bzrlib/ plugins/ keywords/ keywords. py", line 259, in _normal_kw_expander chunks, context) python2. 6/site- packages/ bzrlib/ plugins/ keywords/ keywords. py", line 254, in _kw_expander encoder) ] python2. 6/site- packages/ bzrlib/ plugins/ keywords/ keywords. py", line 221, in expand_keywords
File "/usr/lib/
return the_callable(*args, **kwargs)
File "/usr/lib/
ret = run(*run_argv)
File "/usr/lib/
return self.run(
File "/usr/lib/
return self._operation
File "/usr/lib/
self.cleanups, self.func, *args, **kwargs)
File "/usr/lib/
result = func(*args, **kwargs)
File "/usr/lib/
return super(cmd_export, self).run(*args, **kwargs)
File "/usr/lib/
per_
File "/usr/lib/
per_
File "/usr/lib/
per_
File "/usr/lib/
chunks = filtered_
File "/usr/lib/
chunks = filter.
File "/usr/lib/
return _kw_expander(
File "/usr/lib/
encoder=
File "/usr/lib/
return result + rest
UnicodeDecodeError: 'ascii' codec can't decode byte 0xae in position 2: ordinal not in range(128)