summaryrefslogtreecommitdiffstats
path: root/mchars_alloc.3
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-10-26 18:07:28 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-10-26 18:07:28 +0000
commit69c245b0cf5bf2585729fc7e5d9b2957c1a00851 (patch)
tree2121b16bd41fb701624abb6e92d9c079eb85a698 /mchars_alloc.3
parent769a036f3a9f484327108011e3bfbe984e435947 (diff)
downloadmandoc-69c245b0cf5bf2585729fc7e5d9b2957c1a00851.tar.gz
In -Tascii mode, provide approximations even for some Unicode escape
sequences above codepoint 512 by doing a reverse lookup in the existing mandoc_char(7) character table. Again, groff isn't smart enough to do this and silently discards such escape sequences without printing anything.
Diffstat (limited to 'mchars_alloc.3')
-rw-r--r--mchars_alloc.311
1 files changed, 11 insertions, 0 deletions
diff --git a/mchars_alloc.3 b/mchars_alloc.3
index 34c9fa3f..44442e4a 100644
--- a/mchars_alloc.3
+++ b/mchars_alloc.3
@@ -59,6 +59,8 @@
.Fa "size_t sz"
.Fa "size_t *rsz"
.Fc
+.Ft "const char *"
+.Fn mchars_uc2str "int codepoint"
.Sh DESCRIPTION
These functions translate Unicode character numbers and
.Xr roff 7
@@ -199,6 +201,14 @@ output module use this function to render
and
.Ic \eC\(aq Ns Ar name Ns Ic \(aq
escape sequences.
+.Pp
+The function
+.Fn mchars_uc2str
+performs a reverse lookup of the Unicode
+.Fa codepoint
+and returns an ASCII string representation, or the string
+.Qq <?>
+if none is available.
.Sh FILES
These funtions are implemented in the file
.Pa chars.c .
@@ -218,6 +228,7 @@ following mandoc versions:
.It Fn mchars_num2uc Ta 1.11.3 Ta \(em Ta \(em
.It Fn mchars_spec2cp Ta 1.11.2 Ta Fn chars_spec2cp Ta 1.10.5
.It Fn mchars_spec2str Ta 1.11.2 Ta Fn a2ascii Ta 1.5.3
+.It Fn mchars_uc2str Ta 1.13.2 Ta \(em Ta \(em
.El
.Sh AUTHORS
.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv