aboutsummaryrefslogtreecommitdiffstats
path: root/LIBUTF8_REPLACE_INVALID.3
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-10-23 21:09:14 +0200
committerMattias Andrée <m@maandree.se>2026-10-23 21:09:14 +0200
commit9d247dc831569a4db75ec9466d1a988a82dfba29 (patch)
treebaf2b21897788f630cb2001beb4f9e5bed9940a7 /LIBUTF8_REPLACE_INVALID.3
downloadlibutf8-9d247dc831569a4db75ec9466d1a988a82dfba29.tar.gz
libutf8-9d247dc831569a4db75ec9466d1a988a82dfba29.tar.bz2
libutf8-9d247dc831569a4db75ec9466d1a988a82dfba29.tar.xz
First commitHEAD1.0master
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
-rw-r--r--LIBUTF8_REPLACE_INVALID.337
1 files changed, 37 insertions, 0 deletions
diff --git a/LIBUTF8_REPLACE_INVALID.3 b/LIBUTF8_REPLACE_INVALID.3
new file mode 100644
index 0000000..3919226
--- /dev/null
+++ b/LIBUTF8_REPLACE_INVALID.3
@@ -0,0 +1,37 @@
+.TH LIBUTF8_REPLACE_INVALID 3 LIBUTF8
+.SH NAME
+LIBUTF8_REPLACE_INVALID - Replace decoded invalid Unicode codepoints
+
+.SH SYNOPSIS
+.nf
+#include <libutf8.h>
+
+#define \fBLIBUTF8_REPLACE_INVALID\fP /* implementation omitted */
+.fi
+
+.SH DESCRIPTION
+The
+.B LIBUTF8_REPLACE_INVALID
+macro is a flag for
+.BR libutf8_decode (3)
+and
+.BR libutf8_decode_mem (3).
+It causes those functions to replace a decoded invalid Unicode codepoint with
+.BR LIBUTF8_REPLACEMENT_CHARACTER_CODEPOINT (3)
+rather than reject it.
+.PP
+The flag applies to non-character codepoints (see
+.BR libutf8_is_noncharacter (3)
+for definition) and UTF-16 surrogates.
+It does not make illegal byte sequences, overlong encodings,
+or codepoints above
+.B LIBUTF8_ULTIMATE_CODEPOINT
+valid.
+
+.SH SEE ALSO
+.BR libutf8 (7),
+.BR LIBUTF8_RETURN_INVALID (3),
+.BR LIBUTF8_REPLACEMENT_CHARACTER_CODEPOINT (3),
+.BR libutf8_is_continuation (3),
+.BR libutf8_decode (3),
+.BR libutf8_decode_mem (3)