Skip to content

Support braced Unicode escapes #67279

Closed as not planned
Closed as not planned

Description

@kbrilla

Which @angular/* package(s) are relevant/related to the feature request?

compiler

Description

Angular template expressions currently do not support ES6 braced Unicode escapes (e.g. \u{1F600}) in string literals. This limits the ability to represent modern Unicode code points (such as emoji and historic scripts) directly in templates.

Minimal reproduction

<div>{{ '\u{1F600}' }}</div>

Expected: Renders 😀
Actual: Renders the literal string \u{1F600} or an error.

Proposed solution

Extend the Angular compiler's template expression parser to support ES6 braced Unicode escapes (\u{...}) in string literals, matching JavaScript semantics. Legacy \uXXXX escapes should remain supported for backward compatibility.

Alternatives considered

  • Using legacy \uXXXX escapes with surrogate pairs for non-BMP characters (e.g., emoji). This is error-prone and less readable, requiring manual calculation and two code units per character.
  • Avoiding Unicode escapes and directly pasting Unicode characters. This is not always practical for code points outside BMP or for code generation scenarios.

Activity

  1. kbrilla commented on Feb 25, 2026

    @kbrilla
    ContributorAuthor

    Hi @JeanMeche , I saw #517, but I don't think it isa duplicate. I verified it. Actually wanted to post PR for it too. It touches different things. This issue touches usage of Unicode escapes (e.g. \u{1F600}) in string literals while #517 usage of {{this["我的"]}}

  2. JeanMeche commented on Feb 25, 2026

    @JeanMeche
    Member

    Yeah I just reopened it !

  3. added this to the needsTriage milestone on Feb 25, 2026
  4. JeanMeche commented on Feb 26, 2026

    @JeanMeche
    Member

    For the same reason as #67269

  5. angular-automatic-lock-bot commented on Mar 29, 2026

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  6. locked and limited conversation to collaborators on Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: compilerIssues related to `ngc`, Angular's template compiler

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions