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

Error: Export fails when using characters outside Latin1 range in a Mermaid diagram #67

Closed
maezawa-akira opened this issue Sep 1, 2021 · 0 comments · Fixed by #130
Closed

Comments

@maezawa-akira
Copy link

Thank you for developing this awesome plugin!!

Issue

Export using pandoc fails when using non-ASCII characters in a Mermaid diagram, returning the error: Pandoc Export Failed: InvalidCharacterError: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.

Minimal reproducing example

```mermaid
graph LR
    G[こんにちは] --> A
```

The problem seems to be in convertSVGtoPNG() in renderer.ts, which calls btoa() on a SVG data that contains non-Latin1 characters.

@frogkind frogkind mentioned this issue Jun 30, 2022
OliverBalfour added a commit that referenced this issue Sep 25, 2022
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