Skip to content

Support UTF in Angular expressions #517

Open

Description

@vicb

Currently the lexer in change detection uses StringWrapper.charCodeAt()

  • in Dart it returns s.codeUnitAt() which supports UTF
  • in JS it returns str.charCodeAt() which does not support UTF

Activity

  1. vicb commented on Feb 9, 2015

    @vicb
    ContributorAuthor

    the _Parser class in shim_css.js (shadow_dom_emulation) has the same limitation

  2. added this to the milestone on Apr 28, 2015
  3. modified the milestones: , Backlog on May 29, 2015
  4. fxck commented on Jun 9, 2016

    @fxck

    This, I suppose, would allow things like

    <div [class.u-1/2]="expr"></div>

    right?

  5. 32 remaining items

  6. added
    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
    and removed on Oct 1, 2020
  7. added
    canonicalThis issue represents a canonical design issue in Angular.
    on Aug 2, 2022
  8. doggy8088 commented on Feb 2, 2023

    @doggy8088
    Contributor

    @pkozlowski-opensource I have a workaround for this:

    https://stackblitz.com/edit/angular-ivy-zmtxmg?file=src%2Fapp%2Fapp.component.ts

    import { Component, VERSION } from '@angular/core';
    
    @Component({
      selector: 'my-app',
      template: '<div>{{ this["我的"] }} </div>',
    })
    export class AppComponent  {
      // Chinese character
      我的 = 'Angular';
    }

    image

    I really wish Angular Team can take care of this issue. It's been 8 years since 2015.

  9. cperezabo commented on Sep 12, 2024

    @cperezabo

    It's embarrassing to see projects in 2024 that assume English as the only available language. Part of that unfinishing wish of cultural domination that some societies have.

  10. perceptron8 commented on Sep 23, 2025

    @perceptron8

    The problem is especially challenging with third-party libraries when you don't have control over the data model. I understand that implementing this change isn't easy, but I'm hoping it will happen eventually.

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

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: compilerIssues related to `ngc`, Angular's template compilerarea: coreIssues related to the framework runtimecanonicalThis issue represents a canonical design issue in Angular.compiler: parsercore: binding & interpolationIssue related to property/attribute binding or text interpolationeffort2: daysfreq1: lowstate: confirmedtype: bug/fix

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions