-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
re matching looks broken for unicode #6860
Comments
I've reproduced and reported the bug in micropython. Thank you for this report. |
I also encountered this issue while working on POC of While this is not fixed, one way of making it work is using text.encode("utf-8")[match.start():match.end()].decode("utf-8") This is not an elegant solution, but might be the only way of doing it right now. |
It's worth noting that we should get micropython's bug fix for this when we merge mp version 1.20, which is planned for circuitpython version 9. |
Re-tested. This is fixed as of 9.0.0-alpha.2 |
CircuitPython version
Code/REPL
Behavior
The
start()
andend()
are borked if there's preceeding unicode probably due to flaws in character vs byte counting for variable length unicode/utf world.Description
No response
Additional information
Output from a MagTag:
The text was updated successfully, but these errors were encountered: