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: Garbled Unicode strings #2386

Open
lachrymaLF opened this issue Feb 26, 2025 · 0 comments · May be fixed by #2393
Open

d2js: Garbled Unicode strings #2386

lachrymaLF opened this issue Feb 26, 2025 · 0 comments · May be fixed by #2393

Comments

@lachrymaLF
Copy link

lachrymaLF commented Feb 26, 2025

Example:

import { D2 } from '@terrastruct/d2';
const d2 = new D2();
const result = await d2.compile('あいうえお -> ♒️');
const svg = await d2.render(result.diagram, result.options);

Text tags in d2js output:

<text ...>�����</text>
<text ...>��</text>

Image

Correct output from d2 executable:

<text ...>あいうえお</text>
<text ...>♒️</text>

Image

@x-delfino x-delfino linked a pull request Feb 28, 2025 that will close this issue
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