diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-05-17 11:50:20 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-05-17 11:50:20 +0000 |
commit | c301d6bfc6c1471a4225e7e6e993b6e160f76c1b (patch) | |
tree | 0aa4dd6700e45eb7dc861fe73bf61649fc3eee5c /html.c | |
parent | 8cd2f76125361d3c04dd2730e7748c925a33d2a2 (diff) | |
download | mandoc-c301d6bfc6c1471a4225e7e6e993b6e160f76c1b.tar.gz |
Flip on unicode output (via \[uNNNN]) in -T[x]html. Here we go!
Diffstat (limited to 'html.c')
-rw-r--r-- | html.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -315,6 +315,8 @@ html_strlen(const char *cp) switch (mandoc_escape(&cp, &seq, &ssz)) { case (ESCAPE_ERROR): return(sz); + case (ESCAPE_UNICODE): + /* FALLTHROUGH */ case (ESCAPE_NUMBERED): /* FALLTHROUGH */ case (ESCAPE_PREDEF): @@ -373,6 +375,12 @@ print_encode(struct html *h, const char *p, int norecurse) break; switch (esc) { + case (ESCAPE_UNICODE): + /* Skip passed "u" header. */ + c = mchars_num2uc(seq + 1, len - 1); + if ('\0' != c) + printf("&#x%x;", c); + break; case (ESCAPE_NUMBERED): c = mchars_num2char(seq, len); if ('\0' != c) |