Skip to content
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

String encode utf-8 boundary case errors #2137

Closed
mircea3 opened this issue Jan 3, 2023 · 1 comment
Closed

String encode utf-8 boundary case errors #2137

mircea3 opened this issue Jan 3, 2023 · 1 comment

Comments

@mircea3
Copy link

mircea3 commented Jan 3, 2023

The following test cases are failing. The problem seems to be in py_bytes.js, where < should be changed to <=.

assert '\u007f'.encode('utf-8') == b'\x7f'
assert '\u07ff'.encode('utf-8') == b'\xdf\xbf'
assert '\uffff'.encode('utf-8') == b'\xef\xbf\xbf'
@PierreQuentel
Copy link
Contributor

Thanks for the report and for finding where the bug was 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants