Skip to content

ISO/IEC 10646 support #160

@cuihq

Description

@cuihq

The js-yaml is not support ISO/IEC 10646, please fix it.

YAML’s double-quoted style uses familiar C-style escape sequences. Non-printable 16-bit Unicode and 32-bit (ISO/IEC 10646) characters are supported with escape sequences such as “\u003B” and “\U0000003B”.
-- yaml 1.2 spec

I pass the yaml file below to it。

cat: "\U0001F431" # CAT FACE
dog: "\U0001F436" # DOG FACE

Unfortunately, It wouldn't work well.

var doc = yaml.safeLoad(fs.readFileSync('nature.yml', 'utf-8'));
console.log(doc);

The console show:

cat: '',dog: ''

I want:

"cat"=>"🐱", "dog"=>"🐶",

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions