From 389fbbca3a120663323cf14e78dec68efa804ef3 Mon Sep 17 00:00:00 2001 From: Ruben Dashyan Date: Mon, 6 Jan 2020 14:19:36 +0100 Subject: [PATCH] [python/port] Support for unicode strings --- python/port/genhdr/qstrdefs.in.h | 1 + python/port/mpconfigport.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/python/port/genhdr/qstrdefs.in.h b/python/port/genhdr/qstrdefs.in.h index ff18301c9..c34eb98e3 100644 --- a/python/port/genhdr/qstrdefs.in.h +++ b/python/port/genhdr/qstrdefs.in.h @@ -161,6 +161,7 @@ Q(StopIteration) Q(SyntaxError) Q(SystemExit) Q(TypeError) +Q(UnicodeError) Q(ValueError) Q(ZeroDivisionError) Q(_0x0a_) diff --git a/python/port/mpconfigport.h b/python/port/mpconfigport.h index 77348f656..845bd0944 100644 --- a/python/port/mpconfigport.h +++ b/python/port/mpconfigport.h @@ -50,6 +50,9 @@ // Whether to support property object #define MICROPY_PY_BUILTINS_PROPERTY (0) +// Whether to support unicode strings +#define MICROPY_PY_BUILTINS_STR_UNICODE (1) + // Whether to set __file__ for imported modules #define MICROPY_PY___FILE__ (0)