Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emoji support #53

Open
arpit opened this issue Apr 27, 2019 · 3 comments
Open

Emoji support #53

arpit opened this issue Apr 27, 2019 · 3 comments
Labels

Comments

@arpit
Copy link

@arpit arpit commented Apr 27, 2019

Current parser crashes when trying to load a yaml document with emojis in it.

    var emoji = "馃槂";
    String s = "YAML:  ${emoji} YAML Ain't Markup Language";
    var doc = loadYaml(s);
    print(doc['YAML']);

Error:

Error on line 1, column 8: Unexpected character.
  鈺
1 鈹 YAML:  馃槂 YAML Ain't Markup Language
  鈹        ^
  鈺

package:yaml/src/parser.dart 50:7    Parser.parse
package:yaml/src/loader.dart 165:37  Loader._loadMapping
package:yaml/src/loader.dart 86:16   Loader._loadNode
package:yaml/src/loader.dart 62:20   Loader._loadDocument
@fawazhussain
Copy link

@fawazhussain fawazhussain commented Feb 26, 2020

flutter_emoji is a package which can parse emojis and can be stored as strings for later reference.
https://pub.dev/packages/flutter_emoji

@kevmoo
Copy link
Member

@kevmoo kevmoo commented Mar 1, 2021

I just hit this, too!

@kevmoo
Copy link
Member

@kevmoo kevmoo commented Mar 1, 2021

It seems that the yaml package restricts the INPUT parsing to the same restrictions as the YAML spec defines for OUTPUT, which may be the problem.

See https://yaml.org/spec/1.2/spec.html#id2770814

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants