Skip to content

[Compiler Bug]: Unicode characters handled incorrectly #32915

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

Open
1 of 4 tasks
JCown opened this issue Apr 15, 2025 · 0 comments
Open
1 of 4 tasks

[Compiler Bug]: Unicode characters handled incorrectly #32915

JCown opened this issue Apr 15, 2025 · 0 comments
Labels
Component: Optimizing Compiler Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug Type: Bug

Comments

@JCown
Copy link

JCown commented Apr 15, 2025

What kind of issue is this?

  • React Compiler core (the JS output is incorrect, or your app works incorrectly after optimization)
  • babel-plugin-react-compiler (build issue installing or using the Babel plugin)
  • eslint-plugin-react-compiler (build issue installing or using the eslint plugin)
  • react-compiler-healthcheck (build issue installing or using the healthcheck script)

Link to repro

https://playground.react.dev/#N4Igzg9grgTgxgUxALhAgHgBwjALgAgBMEAzAQygBsCSoA7OXASwjvwFkBPAQU0wAoAlPmAAdNvhgJcsNv3H5F+ADxcAwhAC22OgjoFcGXAF5RIAO4JKcLQnyBeDcDSO2fwB6AHwL8ggNziAvuJBulg4BDZ0YATqWjp6BMb4-JgwEJhgwsbuIl5SMjBsyoRMAG7uwClpYAB0hui4-g6Oyq7FZQEg-kA

Repro steps

When passing a unicode character as a prop, like <MyComponent text="welcome 👋" /> then in RC output code we can see <MyComponent text="welcome \uD83D\uDC4B" /> - unicode character gets replaced by "stringified" UTF-16 representation of it.

Expected result (on the screen)
Welcome 👋

Actual result:
Welcome \uD83D\uDC4B

How often does this bug happen?

Every time

What version of React are you using?

19.1

What version of React Compiler are you using?

19.0.0-beta-ebf51a3-20250411

@JCown JCown added Component: Optimizing Compiler Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug Type: Bug labels Apr 15, 2025
@JCown JCown changed the title [Compiler Bug]: [Compiler Bug]: Unicode characters handled incorrectly Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Optimizing Compiler Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug Type: Bug
Projects
None yet
Development

No branches or pull requests

2 participants
@JCown and others