Author: Matti Picus <[email protected]>
Branch: unicode-utf8-py3
Changeset: r95988:6165ec8e5e76
Date: 2019-02-12 23:19 +0200
http://bitbucket.org/pypy/pypy/changeset/6165ec8e5e76/

Log:    allow surrogates in wcharpsize2utf8

diff --git a/rpython/rtyper/lltypesystem/rffi.py 
b/rpython/rtyper/lltypesystem/rffi.py
--- a/rpython/rtyper/lltypesystem/rffi.py
+++ b/rpython/rtyper/lltypesystem/rffi.py
@@ -1029,7 +1029,7 @@
 
     s = StringBuilder(size)
     for i in range(size):
-        rutf8.unichr_as_utf8_append(s, ord(w[i]))
+        rutf8.unichr_as_utf8_append(s, ord(w[i]), True)
     return s.build()
 
 def wcharp2utf8(w):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to