Skip to content

Unicode encoding for record keys fails for surrogate pairs #2438

Description

@kritzcreek

This piece of code type checks:

x :: String
x = {"𝌆": "hi"}."𝌆"

but generates invalid JS like so:

var x = {"\119558": "hi"}["\ud834\udf06"];

The issue here is that the key needs to be encoded as a surrogate pair just like the accessor is.

Just something I stumbled upon while trying to work through the String -> Text unicode issues.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions