koniu / recoll-webui

web interface for recoll desktop search
266 stars 55 forks source link

Cannot Download/Open files with special characters in the filename #16

Closed wonx closed 10 years ago

wonx commented 10 years ago

The title says it all. I have several files which include diacritical marks (àáüïè·ó...), and I am unable to open them from recoll-webui (Error code: ERR_FILE_NOT_FOUND). They work fine in the standard Recoll interface.

Examples of filenames that cause that error are:

It seems to affect all kinds of file formats and extensions.

Tell me if you can't reproduce the error

(Recoll 1.19.3 in Debian 7. Index was just rebuilt from scratch)

PS: This is what appears in recoll-webui console

Traceback (most recent call last):
  File "/root/recoll-webui-master/bottle.py", line 744, in _handle
    return route.call(**args)
  File "/root/recoll-webui-master/bottle.py", line 1479, in wrapper
    rv = callback(*a, **ka)
  File "/root/recoll-webui-master/webui.py", line 307, in edit
    'attachment; filename=%s' % os.path.basename(path)
  File "/root/recoll-webui-master/bottle.py", line 1692, in __setitem__
    def __setitem__(self, key, value): self.dict[_hkey(key)] = [str(value)]
UnicodeEncodeError: 'ascii' codec can't encode character u'\xb7' in position 39: ordinal not in range(128)
192.168.1.130 - - [15/Sep/2013 12:40:36] "GET /edit/46?sort=relevancyrating&before=&query=odt&after=&page=2&dir=%3Call%3E&ascending=0 HTTP/1.1" 500 1800