Skip to content

Unicode codepoints outside of the Basic Multilingual Plane are incorrectly encoded #496

@MineRobber9000

Description

@MineRobber9000

The \uXXXX only takes 4 hex digits, which is enough for any Unicode codepoint in the Basic Multilingual Plane. For characters outside of the Basic Multilingual Plane:

  • SNBT supports \Uxxxxxxxx, an 8-character "extended" Unicode escape,
  • while JSON requires encoding the characters as a UTF-16 surrogate pair.

mecha currently just chucks any codepoint over 128 in front of a \u escape, even if that codepoint is outside of the Basic Multilingual Plane.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions