Skip to content

Commit

Permalink
md2html: Add <meta charset="UTF-8"> with output with --full-html.
Browse files Browse the repository at this point in the history
Fixes #231.
  • Loading branch information
mity committed Jan 25, 2024
1 parent f46000c commit 4933a89
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions md2html/md2html.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ process_file(const char* in_path, FILE* in, FILE* out)
fprintf(out, "<head>\n");
fprintf(out, "<title>%s</title>\n", html_title ? html_title : "");
fprintf(out, "<meta name=\"generator\" content=\"md2html\"%s>\n", want_xhtml ? " /" : "");
#if !defined MD4C_USE_ASCII && !defined MD4C_USE_UTF16
fprintf(out, "<meta charset=\"UTF-8\"%s>\n", want_xhtml ? " /" : "");
#endif
if(css_path != NULL) {
fprintf(out, "<link rel=\"stylesheet\" href=\"%s\"%s>\n", css_path, want_xhtml ? " /" : "");
}
Expand Down

0 comments on commit 4933a89

Please sign in to comment.