Skip to content

Can I set character encoding/charset when generating a PDF? #558

Answered by yhatt
awvalenti asked this question in Q&A
Discussion options

You must be logged in to vote

Currently Marp assumes the encoding for each input as UTF-8. A classic Marp app had been detected charset of Markdown automatically, but there were a lot of reports about misdetection. (yhatt/marp#86)

VS Code extension will export by using a temporarily file that is converted to UTF-8 when exporting a dirty Markdown (There is unsaved changes). In this case, PDF will be exported correctly even if Markdown is not having UTF-8 charset. So VS Code extension probably can fix it by updating the condition for using the temporarily file.
https://github.com/marp-team/marp-vscode/blob/bc09bd5241c28889ec077a7820992599a0e307cd/src/marp-cli.ts#L30

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@yhatt
Comment options

Answer selected by awvalenti
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants