Skip to content

fix(es): Fix unicode handling #10734

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

fix(es): Fix unicode handling #10734

wants to merge 2 commits into from

Conversation

kdy1
Copy link
Member

@kdy1 kdy1 commented Jun 30, 2025

Description:

Copy link

codspeed-hq bot commented Jun 30, 2025

CodSpeed Performance Report

Merging #10734 will not alter performance

Comparing kdy1/unicode (8bad4cf) with main (38132e0)

Summary

✅ 140 untouched benchmarks

@@ -1112,26 +1112,31 @@ pub trait Lexer<'a, TokenAndSpan>: Tokens<TokenAndSpan> + Sized {
op(self, &mut buf)
}

fn read_unicode_escape(&mut self) -> LexResult<Vec<Char>> {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @bvanjoi Do you think this change is correct?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand correctly, this implementation appears incorrect. For read_unicode_escape('\u0041'), we expect the raw character sequence ['\\', 'u', '0', '0', '4', '1'] as output, not the decoded 'A' directly.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I think you are right

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

Successfully merging this pull request may close these issues.

2 participants