Unicode guidance

The character string “⌘” in my source code in TypeScript gets rendered properly in TypeScript React. But when this string is in ReScript source code and rendered using the ReScript bindings to React it shows up as a few weird bytes/garbage. Changing the string in ReScript to use backticks fixed it. Should all my strings use backticks? When would you NOT want to do that? Maybe the docs should explain about this in the primitive types section. I know this has something to do with limited unicode support.

Doesn’t get rendered properly in ReScript React.

  | Meta => "⌘"

That’s indeed a pain point, the good thing is that it is already fixed in the master.
For a work around, you can try this:

| Meta => `⌘`
3 Likes

Being me new in Rescript I didn’t know about the Unicode limitation which is something quite old BTW.