add multibyte support for python/Ultisnips compatibility