Comment 12 for bug 335362

Revision history for this message
John A Meinel (jameinel) wrote : Re: UnicodeDecodeError when processing paths that have the character รค

Looking at the bzr log, it seems that 'bzr init' works fine:

0.437 creating repository in file:///D:/TEMP/%C3%A4/.bzr/.

^- that is a valid URL (using UTF-8 + urlquoting)

v- Hmm.. this is a UTF-8 path. I probably would have expected Unicode, but potentially this has to do with us writing to the log file.

0.672 opening working tree 'D:/TEMP/\xc3\xa4'
0.969 opening working tree 'D:/TEMP/\xc3\xa4'
1.062 return code 0
1533.813 opening working tree 'D:/TEMP/\xc3\xa4'
1533.813 opening working tree 'D:/TEMP/\xc3\xa4'

^- 1500 seconds

Looking at the second half:
  File "tbzrcommand.py", line 177, in invoke_command
  File "D:/ohjelmistot/Bazaar/plugins\qbzr\lib\commands.py", line 125, in run
  File "D:/ohjelmistot/Bazaar/plugins\qbzr\lib\commands.py", line 112, in run
  File "D:/ohjelmistot/Bazaar/plugins\qbzr\lib\commands.py", line 141, in run
  File "D:/ohjelmistot/Bazaar/plugins\qbzr\lib\commands.py", line 308, in _qbzr_run
  File "bzrlib\builtins.pyo", line 70, in tree_files
  File "bzrlib\builtins.pyo", line 119, in internal_tree_files
  File "bzrlib\osutils.pyo", line 297, in _win32_realpath

^- It would appear that "_qbzr_run" is passing a plain "str" to tree_files, rather than passing in a Unicode string, and that is causing us to try to cast it into Unicode.

I think the correct fix would be in "qbzr\lib\commands.py" to have it properly handle non-ascii, and pass it down appropriately. It seemed to get it right for "init" so it seems to just need to be updated for whatever this next step is. (My guess is 'status')