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

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

StephLin
Copy link
Contributor

@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.

@timkpaine timkpaine force-pushed the bugfix/fix-tmpfile-encoding branch from b499936 to 84a90f3 Compare September 12, 2024 14:02
This avoids parsing error due to incorrect encoding in mermaid.js.
@timkpaine timkpaine force-pushed the bugfix/fix-tmpfile-encoding branch from 84a90f3 to 21b7d63 Compare September 12, 2024 14:19
@timkpaine timkpaine merged commit 32b2077 into mgaitan:master Sep 12, 2024
15 checks passed
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.

2 participants