Open hpoul opened 2 years ago
have same problem . T T
If you need to use characters like emoji which is encoded with two UTF-16 code units, you can just access it with the uppercase escape sequence \U
and enter the UTF-32 codepoint directly.
For instance, 😅 is U+1F605
, so you'd write:
test: "Lorem ipsum \U0001F605" # must be in 32 bits / 8 bytes.
It should be allowed to add arbitrary escape sequences in quoted strings like:
the weird thing is that emojis in quoted strings work, but only if they are not escaped:
testYaml(r'''test: "Lorem ipsum 😅"''');
```dart void main(ListtestYaml(r'''test: "Lorem ipsum \uD83D\uDE05"''');
I haven't found anything in the yaml spec which would limit the character set allowed as escaped characters.