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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unicode support improvements #50

Closed
jangko opened this issue Apr 27, 2021 · 1 comment · Fixed by #100
Closed

unicode support improvements #50

jangko opened this issue Apr 27, 2021 · 1 comment · Fixed by #100
Labels
low priority This is not very important

Comments

@jangko
Copy link
Collaborator

jangko commented Apr 27, 2021

@jangko jangko added the low priority This is not very important label Apr 29, 2021
@jangko
Copy link
Collaborator Author

jangko commented Jul 2, 2021

Summary of Unicode important points:

  • GraphQL does not have an official encoding, it stays at the abstraction of a "sequence of code points"

  • Graphql document:

    • UTF16-BE BOM: 0xFE, 0xFF
    • UTF-8 BOM: 0xEF,0xBB,0xBF
    • string encoding: UTF-16 or UTF-8
    • escaped unicode in quoted string take the form of UTF-16 BE:
      • 4 digit hex: \u000A
      • variable length: \u{1F4A9}
      • range (>= 0x0000 and <= 0xD7FF or >= 0xE000 and <= 0x10FFFF)
      • Escape sequences are only meaningful within a single-quoted string
      • SurrogatePair: "\uD83D\uDCA9" is equal to "\u{1F4A9}"
    • Document: ASCII, UTF-16, UTF-8
      • graphql will use ASCII for the language expression, but strings and comments can use Unicode encoding
  • JSON Serialization Format:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low priority This is not very important
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant