]> granicus.if.org Git - vim/commitdiff
updated for version 7.4a.008 v7.4a.008
authorBram Moolenaar <Bram@vim.org>
Tue, 9 Jul 2013 15:30:55 +0000 (17:30 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 9 Jul 2013 15:30:55 +0000 (17:30 +0200)
Problem:    Python 3 doesn't handle multibyte characters prooperly when
            'encoding' is not utf-8.
Solution:   Use PyUnicode_Decode() instead of PyUnicode_FromString(). (Ken
            Takata)

src/if_python3.c
src/version.c

index 8a7a3a4b17c08851a5e6d4323db1c44cfd99327b..8a5b3329e0b11626e05370e1511bb2349f52ada2 100644 (file)
@@ -86,7 +86,8 @@
 #ifndef PyString_Check
 # define PyString_Check(obj) PyUnicode_Check(obj)
 #endif
-#define PyString_FromString(repr) PyUnicode_FromString(repr)
+#define PyString_FromString(repr) \
+    PyUnicode_Decode(repr, STRLEN(repr), ENC_OPT, NULL)
 #define PyString_FromFormat PyUnicode_FromFormat
 #ifndef PyInt_Check
 # define PyInt_Check(obj) PyLong_Check(obj)
index 02086c7660a795a5889c8b5e274b6b5147289e0d..5f8df773173c36de4dd758c796be1fa3ba13ad5e 100644 (file)
@@ -728,6 +728,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    8,
 /**/
     7,
 /**/