]> Savannah Git Hosting - gnulib.git/commit
striconveh: Support an error handler that produces a Unicode U+FFFD.
authorBruno Haible <bruno@clisp.org>
Sat, 1 Jan 2022 18:48:54 +0000 (19:48 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 1 Jan 2022 18:48:54 +0000 (19:48 +0100)
commita7b896b830ae70699473440199889ffc0088cf29
tree96cadc34b803f59ef7eb1bb135fd84e1ba233068
parentff468794101e86e0e198fdfdba23df7f575cc570
striconveh: Support an error handler that produces a Unicode U+FFFD.

Suggested by Marc Nieper-Wißkirchen in
<https://lists.gnu.org/archive/html/bug-gnulib/2021-12/msg00175.html>.

* lib/iconveh.h (iconveh_replacement_character): New enum value.
* lib/striconveh.c (mem_cd_iconveh_internal): When the handler is
iconveh_replacement_character, try to produce U+FFFD when possible,
instead of '?'.
* tests/test-striconveh.c (main): Add GB18030 tests. Test also
iconveh_replacement_character.
ChangeLog
lib/iconveh.h
lib/striconveh.c
tests/test-striconveh.c