8000 API Explorer does not support unicode in payload · Issue #96 · encoredev/encore · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

API Explorer does not support unicode in payload #96

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

Closed
eandre opened this issue Sep 20, 2021 · 0 comments · Fixed by #97
Closed

API Explorer does not support unicode in payload #96

eandre opened this issue Sep 20, 2021 · 0 comments · Fixed by #97

Comments

@eandre
Copy link
Member
eandre commented Sep 20, 2021

Encore's API Explorer encodes API payloads into base64 to serialize arbitrary bytes into JSON (and be compatible with Go's handling of []byte in JSON). Unfortunately this causes a problem due to how JavaScript's atob/btoa functions work with unicode (see The Unicode Problem on MDN), and results in an exception:

Uncaught (in promise) DOMException: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant
0