summaryrefslogtreecommitdiff
path: root/src/man.c
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-02-15 22:42:49 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-02-15 22:42:49 -0800
commitaf5bff782a9682531da0dec6469748cd0ea48489 (patch)
tree2f87583a63c5d5b14aa2504991cc7e0f93ee5195 /src/man.c
parentd7aec31cf9bfb616f648e85b086e1e683a2d3629 (diff)
Fixed man escaping for unicode characters.
Diffstat (limited to 'src/man.c')
-rw-r--r--src/man.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/man.c b/src/man.c
index 0194010..4098139 100644
--- a/src/man.c
+++ b/src/man.c
@@ -25,14 +25,14 @@ static void escape_man(cmark_strbuf *dest, const unsigned char *source, int leng
if (beginLine) {
cmark_strbuf_puts(dest, "\\&.");
} else {
- cmark_strbuf_putc(dest, source[i]);
+ utf8proc_encode_char(c, dest);
}
break;
case 39:
if (beginLine) {
cmark_strbuf_puts(dest, "\\&'");
} else {
- cmark_strbuf_putc(dest, source[i]);
+ utf8proc_encode_char(c, dest);
}
break;
case 45:
@@ -60,7 +60,7 @@ static void escape_man(cmark_strbuf *dest, const unsigned char *source, int leng
cmark_strbuf_puts(dest, "\\[en]");
break;
default:
- cmark_strbuf_putc(dest, source[i]);
+ utf8proc_encode_char(c, dest);
}
beginLine = (c == 10);
i += len;