jceb / vim-orgmode

Text outlining and task management for Vim based on Emacs' Org-Mode
http://www.vim.org/scripts/script.php?script_id=3642
Other
3.12k stars 267 forks source link

Non-ASCII characters in filenames cause UnicodeDecodeError when opening agenda view #362

Open sevcsik opened 4 years ago

sevcsik commented 4 years ago

Hi!

If there are non-ascii filenames on my g:org_agenda_files, when I enter the agenda view, I get the following error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/nix/store/4xcf67ki8hdjqjgsidblkc371f28r2di-vim-pack-dir/pack/myVimPackage/start/vim-orgmode/ftplugin/orgmode/plugins/Agenda.py", line 143, in list_next_week
    agenda_documents = cls._get_agendadocuments()
  File "/nix/store/4xcf67ki8hdjqjgsidblkc371f28r2di-vim-pack-dir/pack/myVimPackage/start/vim-orgmode/ftplugin/orgmode/plugins/Agenda.py", line 83, in _get_agendadocuments
    return self._load_agendafiles(agenda_files)
  File "/nix/store/4xcf67ki8hdjqjgsidblkc371f28r2di-vim-pack-dir/pack/myVimPackage/start/vim-orgmode/ftplugin/orgmode/plugins/Agenda.py", line 99, in _load_agendafiles
    vim.command(u_encode(u'badd %s' % agenda_file.replace(" ", "\\ ")))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 54: ordinal not in range(128)

If I rename the offending file to only contain ASCII characters (the offending filename was Felújítás.org), it works fine. My locale is hu_HU.UTF-8.