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"=>"🐶",
The js-yaml is not support ISO/IEC 10646, please fix it.
I pass the yaml file below to it。
Unfortunately, It wouldn't work well.
The console show:
I want: