To: vim_dev@googlegroups.com Subject: Patch 8.2.0070 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0070 Problem: Crash when using Python 3 with "debug" encoding. (Dominique Pelle) Solution: Use "euc-jp" whenever enc_dbcs is set. Files: src/testdir/test_python3.vim, src/if_py_both.h *** ../vim-8.2.0069/src/testdir/test_python3.vim 2019-12-31 21:58:57.643344472 +0100 --- src/testdir/test_python3.vim 2020-01-01 14:41:55.283492938 +0100 *************** *** 172,176 **** --- 172,180 ---- " this crashed Vim once set encoding=utf32 py3 print('hello') + set encoding=debug + py3 print('hello') + set encoding=euc-tw + py3 print('hello') set encoding=utf8 endfunc *** ../vim-8.2.0069/src/if_py_both.h 2019-12-31 21:58:57.643344472 +0100 --- src/if_py_both.h 2020-01-01 14:42:42.647385895 +0100 *************** *** 19,25 **** typedef int Py_ssize_t; // Python 2.4 and earlier don't have this type. #endif ! #define ENC_OPT (enc_utf8 ? "utf-8" : (char *)p_enc) #define DOPY_FUNC "_vim_pydo" static const char *vim_special_path = "_vim_path_"; --- 19,26 ---- typedef int Py_ssize_t; // Python 2.4 and earlier don't have this type. #endif ! // Use values that are known to work, others may make Vim crash. ! #define ENC_OPT (enc_utf8 ? "utf-8" : enc_dbcs ? "euc-jp" : (char *)p_enc) #define DOPY_FUNC "_vim_pydo" static const char *vim_special_path = "_vim_path_"; *** ../vim-8.2.0069/src/version.c 2019-12-31 22:36:14.561918852 +0100 --- src/version.c 2020-01-01 14:58:07.521191485 +0100 *************** *** 744,745 **** --- 744,747 ---- { /* Add new patch number below this line */ + /**/ + 70, /**/ -- Life is a gift, living is an art. (Bram Moolenaar) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///