Call for testing: Open Recent in Explorer with non-ascii paths

Alexander Belchenko bialix at ukr.net
Tue Jan 26 11:58:55 GMT 2010


Ian Clatworthy пишет:
> A frequently requested feature in Explorer was added today: File > Open
> Recent. There's also a panel on the welcome page showing recently opened
> locations.
> 
> This works for me but, if history is any guide, I probably don't have
> all the bugs ironed out wrt non-ASCII paths. If you frequently use paths
> or URLs with special characters, please test this feature, raise bugs,
> submit fixes, etc.

Yes, it's broken for me.
The code trying to save localized string for title:

C:\work\Bazaar\plugins\explorer\lib>bzr explore
bzr: ERROR: exceptions.UnicodeEncodeError: 'ascii' codec can't encode 
characters
  in position 0-5: ordinal not in range(128)

Traceback (most recent call last):
   File "bzrlib\commands.pyo", line 853, in exception_to_return_code
   File "bzrlib\commands.pyo", line 1055, in run_bzr
   File "bzrlib\commands.pyo", line 661, in run_argv_aliases
   File "bzrlib\commands.pyo", line 665, in run_direct
   File "bzrlib\cleanup.pyo", line 122, in run_simple
   File "bzrlib\cleanup.pyo", line 156, in _do_with_cleanups
   File "C:\work\Bazaar\plugins\explorer\lib\commands.py", line 137, in run
   File "C:\work\Bazaar\plugins\explorer\lib\explorer.py", line 197, in 
__init__
   File "C:\work\Bazaar\plugins\explorer\lib\explorer.py", line 1725, in 
do_welcome
   File "C:\work\Bazaar\plugins\explorer\lib\location_viewer.py", line 
112, in add_location
   File "C:\work\Bazaar\plugins\explorer\lib\location_viewer.py", line 
118, in _record_history
   File "C:\work\Bazaar\plugins\explorer\lib\history_manager.py", line 
88, in add_recent
   File "C:\work\Bazaar\plugins\explorer\lib\history_manager.py", line 
70, in _save
UnicodeEncodeError: 'ascii' codec can't encode characters in position 
0-5: ordinal not in range(128)

The code in question:

             writer.writerow(["Url", "Kind", "Title", "Timetamp"])
             for url, kind, title, timestamp in 
self._history[:self.max_size]:
                 row = (url, kind, title, timestamp)
                 writer.writerow(row)

btw, first line shoulde be "Timestamp", correct?




More information about the bazaar mailing list