Skip to content

Commit

Permalink
bricks/_common/mpconfigport: enable unicode support
Browse files Browse the repository at this point in the history
Enable MICROPY_PY_BUILTINS_STR_UNICODE on hubs with PYBRICKS_OPT_EXTRA_MOD.

Without this, there is not any difference between str and bytes, which
can make it hard to work with multi-byte characters.
  • Loading branch information
dlech committed Oct 27, 2024
1 parent 4d457a1 commit da56a4d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## [Unreleased]

### Changed

- Enabled UTF-8 support for `str` objects.
- The method `DriveBase.angle()` now returns a float ([support#1844]). This
makes it properly equivalent to `hub.imu.heading`.

Expand Down
1 change: 1 addition & 0 deletions bricks/_common/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
#define MICROPY_PY_BUILTINS_SLICE (PYBRICKS_OPT_EXTRA_MOD)
#define MICROPY_PY_BUILTINS_PROPERTY (0)
#define MICROPY_PY_BUILTINS_MIN_MAX (1)
#define MICROPY_PY_BUILTINS_STR_UNICODE (PYBRICKS_OPT_EXTRA_MOD)
#define MICROPY_PY___FILE__ (0)
#define MICROPY_PY_MICROPYTHON_MEM_INFO (1)
#define MICROPY_PY_GC (PYBRICKS_OPT_EXTRA_MOD)
Expand Down

0 comments on commit da56a4d

Please sign in to comment.