Skip to content

please respect unicode strings you are given #231

@vkz

Description

@vkz

esprima.parse('a = "привет"') clearly preserves unicode strings in the format supplied

{ type: 'Program',
  body: 
   [ { type: 'ExpressionStatement',
       expression: 
        { type: 'AssignmentExpression',
          operator: '=',
          left: { type: 'Identifier', name: 'a' },
          right: { type: 'Literal', value: 'привет', raw: '"привет"' } } } ] }

esgen(esprima.parse('a = "привет"')) clearly does not

a = '\u043F\u0440\u0438\u0432\u0435\u0442';

Technically these js-strings are equivalent, but why forego readability?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions