Skip to content

Commit 8137ff5

Browse files
dlechlaurensvalk
authored andcommitted
bricks/_common/mpconfigport: Enable unicode.
Enable MICROPY_PY_BUILTINS_STR_UNICODE on hubs with PYBRICKS_OPT_EXTRA_LEVEL2. Without this, there is not any difference between str and bytes, which can make it hard to work with multi-byte characters.
1 parent e225a06 commit 8137ff5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
state.
1717

1818
### Changed
19-
19+
- Enabled UTF-8 support for `str` objects.
2020
- The method `DriveBase.angle()` now returns a float ([support#1844]). This
2121
makes it properly equivalent to `hub.imu.heading`.
2222
- Re-implemented tilt using the gyro data by default. Pure accelerometer tilt

bricks/_common/mpconfigport.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
#define MICROPY_PY_BUILTINS_SLICE (PYBRICKS_OPT_EXTRA_LEVEL1)
8181
#define MICROPY_PY_BUILTINS_PROPERTY (0)
8282
#define MICROPY_PY_BUILTINS_MIN_MAX (1)
83+
#define MICROPY_PY_BUILTINS_STR_UNICODE (PYBRICKS_OPT_EXTRA_LEVEL2)
8384
#define MICROPY_PY___FILE__ (0)
8485
#define MICROPY_PY_MICROPYTHON_MEM_INFO (1)
8586
#define MICROPY_PY_GC (PYBRICKS_OPT_EXTRA_LEVEL1)

0 commit comments

Comments
 (0)