Skip to content

Conversation

@ank634
Copy link

@ank634 ank634 commented Nov 21, 2024

Problem

Currently when a windows machine wants to display a state diagram that has the → character there is an error
Screenshot 2024-11-21 005631

The reason for this issue lies in the library render-html. render-html does relies on writing and opening a file when rendering it. render-html does not have an interface to select the encoding so the default one for each operating system is chosen. It just so happens to be that windows default is not utf-8 and the windows default encoding does not support the → by default, causing this error. linux and mac os have utf-8 encoding by default so this error does not arise for those operating system.

Proposed solution

To fix this I have forked render-html and published a package that has kept the interface the same except added an optional parameter for encoding. I have updated the project to use this new package and edited the source code to pass utf-8 encoding when rendering the html. This has fixed the problem.

…-8 so windows machines which dont always use utf-8 by default can have acces to the right arrow character when displaying state diagrams for pdas
@ank634
Copy link
Author

ank634 commented Nov 21, 2024

See the source code for the render-html fork
https://github.com/ank634/render-html

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