Skip to content

Since v1.28.0, the exec function transforms the \x00 char in \x01 on ESP32 #19529

Description

@epeios-q37

Port, board and/or hardware

ESP32-C3 SuperMini

MicroPython version

  • MicroPython v1.28.0 on 2026-04-06; ESP32C3 module with ESP32C3;
  • MicroPython v1.29.0-preview.627.g8250ff1c11 on 2026-07-26; ESP32C3 module with ESP32-C3

Reproduction

  1. Open the REPL
  2. launch:
exec('print(repr("\x00"))')

Expected behaviour

Expected to print:

'\x00'

Observed behaviour

Instead prints:

'\x01'

Additional Information

This bug does not occur in v1.27.0 and earlier.

Code of Conduct

Yes, I agree

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpy-coreRelates to py/ directory in source

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions