Markdown2Pdf icon indicating copy to clipboard operation
Markdown2Pdf copied to clipboard

JTidy breaks unicode characters

Open korri123 opened this issue 2 years ago • 0 comments

Hey, not sure if this is still being developed but here it goes.

JTidy dependency used to convert HTML snippet to full page will malformat special characters (þ, æ, ð, á etc.) as it's bugged and uses UTF-16

Temporary hacky solution is to replace HtmlCleaner#clean with

return String.format("<html><head><meta charset=\"UTF-8\" /></head><body>%s</body></html>", input);

korri123 avatar Jan 15 '23 02:01 korri123