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

Fix encoding of tmp input file #139

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

StephLin
Copy link

@StephLin StephLin commented Jun 4, 2024

When invoking make latex in a sphinx project, a parsing error may be raised from mermaid.js due to incorrect encoding of temporary file tmpfn. This issue can be reproduced when mermaid diagram contains non-ASCII text (such as Chinese).

This PR avoids this kind of parsing error by specifying file encoding as UTF-8 when writing stuff to tmpfn.

This avoids parsing error due to incorrect encoding in mermaid.js.
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.

1 participant