[Compiler Bug]: Unicode characters handled incorrectly #32915
Labels
Component: Optimizing Compiler
Status: Unconfirmed
A potential issue that we haven't yet confirmed as a bug
Type: Bug
What kind of issue is this?
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
The text was updated successfully, but these errors were encountered: