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

d2js: support unicode characters #2393

Merged
merged 2 commits into from
Mar 4, 2025

Conversation

x-delfino
Copy link
Contributor

fixes unicode support for d2js

closes #2386 (contains screenshot of current behaviour)

Basically btoa() doesn't support unicode as detailed here on MDN so the unicode characters aren't decoded properly when the processing the response

I followed the approach suggested by MDN and have added in a test as well

working in browser version:

Screenshot

Copy link
Collaborator

@alixander alixander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! thanks

@alixander alixander merged commit a776023 into terrastruct:master Mar 4, 2025
3 checks passed
@gjf7
Copy link

gjf7 commented Mar 7, 2025

@alixander Could we have a npm package release for this? Because we are currently blocked by this bug. Thanks!

@gjf7
Copy link

gjf7 commented Mar 7, 2025

I also noticed that the last release for @terrastruct/d2 is two months ago

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 this pull request may close these issues.

d2js: Garbled Unicode strings
3 participants