denoland / denoland/std

YAML stringify not support emoji flags.

Open
#3,689 4 comments 2 reactions 0 assignees View on GitHub
bug needs triage
Dominant language
TypeScript
Stars
3.6k
Forks
681
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

YAML parse not support emoji flags.

**Steps to Reproduce**

```ts
import * as YAML from "https://deno.land/std@0.203.0/yaml/mod.ts";
const yamlStr = `
country: 🇯🇵
`;

const data = YAML.parse(yamlStr) as any;

console.log(data); // { country: "🇯🇵" }

console.log(YAML.stringify(data)); // country: "\U0001F1EF\U0001F1F5"
```

![image](https://github.com/denoland/deno_std/assets/140048181/10966413-a875-458c-9149-c30836342bb6)

**Expected behavior**

support emoji flags.

**Environment**

deno 1.37.0 (release, x86_64-unknown-linux-gnu)
v8 11.8.172.3
typescript 5.2.2

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.