From 49aebdbb02ae63e2cf558f6c3d8a40bfed359f9d Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Wed, 27 Jan 2021 20:21:46 -0800 Subject: [PATCH] adding unicode fixup base on #4939 discussion Signed-off-by: Nikolaj Bjorner --- src/api/python/z3/z3.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/api/python/z3/z3.py b/src/api/python/z3/z3.py index 622d2152b..dba147779 100644 --- a/src/api/python/z3/z3.py +++ b/src/api/python/z3/z3.py @@ -10138,6 +10138,7 @@ def is_string_value(a): def StringVal(s, ctx=None): """create a string expression""" + s = "".join(str(ch) if ord(ch) < 128 else "\\u{%x}" % (ord(ch)) for ch in s) ctx = _get_ctx(ctx) return SeqRef(Z3_mk_lstring(ctx.ref(), len(s), s), ctx)