SirVer/ultisnips — pull request #253 by devat (2014-03-30 10:28:35+00:00)
Title: hotfix expect UnicodeDecode in _vim_enc

When running any snippets, it fail with message (below).
The broken commit was 5ac0436694ae997b440a7a768d736f536ea59254 (first which produced this error).

Message:

An error occured. This is either a bug in UltiSnips or a bug in a
snippet definition. If you think this is a bug, please report it to
https://github.com/SirVer/ultisnips/issues/new.

Following is the full stack trace:
Traceback (most recent call last):
File "/home/ivan/.vim/bundle/ultisnips/pythonx/UltiSnips/snippet_manager.py", line 54, in wrapper
return func(self, *args, **kwds)
File "/home/ivan/.vim/bundle/ultisnips/pythonx/UltiSnips/snippet_manager.py", line 118, in expand
if not self._try_expand():
File "/home/ivan/.vim/bundle/ultisnips/pythonx/UltiSnips/snippet_manager.py", line 529, in _try_expand
self._do_snippet(snippet, before)
File "/home/ivan/.vim/bundle/ultisnips/pythonx/UltiSnips/snippet_manager.py", line 474, in _do_snippet
self._map_inner_keys()
File "/home/ivan/.vim/bundle/ultisnips/pythonx/UltiSnips/snippet_manager.py", line 317, in _map_inner_keys
" =UltiSnips#JumpForwards()")
File "/home/ivan/.vim/bundle/ultisnips/pythonx/UltiSnips/_vim.py", line 88, in command
return as_unicode(vim.command(as_vimencoding(cmd)))
File "/home/ivan/.vim/bundle/ultisnips/pythonx/UltiSnips/compatibility.py", line 94, in as_vimencoding
return _vim_enc(string)
File "/home/ivan/.vim/bundle/ultisnips/pythonx/UltiSnips/compatibility.py", line 24, in _vim_enc
return string.encode(vim.eval("&encoding"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 27: ordinal not in range(128)