File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,7 +19,8 @@ static char_u e_py_systemexit[] = "E880: Can't handle SystemExit of %s exception
1919typedef int Py_ssize_t ; // Python 2.4 and earlier don't have this type.
2020#endif
2121
22- #define ENC_OPT (enc_utf8 ? "utf-8" : (char *)p_enc)
22+ // Use values that are known to work, others may make Vim crash.
23+ #define ENC_OPT (enc_utf8 ? "utf-8" : enc_dbcs ? "euc-jp" : (char *)p_enc)
2324#define DOPY_FUNC "_vim_pydo"
2425
2526static const char * vim_special_path = "_vim_path_" ;
Original file line number Diff line number Diff line change @@ -172,5 +172,9 @@ func Test_unicode()
172172 " this crashed Vim once
173173 set encoding = utf32
174174 py3 print (' hello' )
175+ set encoding = debug
176+ py3 print (' hello' )
177+ set encoding = euc- tw
178+ py3 print (' hello' )
175179 set encoding = utf8
176180endfunc
Original file line number Diff line number Diff line change @@ -742,6 +742,8 @@ static char *(features[]) =
742742
743743static int included_patches [] =
744744{ /* Add new patch number below this line */
745+ /**/
746+ 70 ,
745747/**/
746748 69 ,
747749/**/
You can’t perform that action at this time.
0 commit comments