patch 8.2.2178: Python 3: non-utf8 character cannot be handled
Problem: Python 3: non-utf8 character cannot be handled.
Solution: Change the string decode. (Björn Linse, closes #1053)
diff --git a/src/testdir/test_python2.vim b/src/testdir/test_python2.vim
index afefd10..cf35a50 100644
--- a/src/testdir/test_python2.vim
+++ b/src/testdir/test_python2.vim
@@ -3775,4 +3775,11 @@
close!
endfunc
+func Test_python_non_utf8_string()
+ smap <Esc>@ <A-@>
+ python vim.command('redir => _tmp_smaps | smap | redir END')
+ python vim.eval('_tmp_smaps').splitlines()
+ sunmap <Esc>@
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_python3.vim b/src/testdir/test_python3.vim
index 78fe5d4..1a86a7e 100644
--- a/src/testdir/test_python3.vim
+++ b/src/testdir/test_python3.vim
@@ -4008,4 +4008,11 @@
call assert_equal(1, g:options_iter_ref_count_increase)
endfunc
+func Test_python3_non_utf8_string()
+ smap <Esc>@ <A-@>
+ py3 vim.command('redir => _tmp_smaps | smap | redir END')
+ py3 vim.eval('_tmp_smaps').splitlines()
+ sunmap <Esc>@
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab