]> git.ipfire.org Git - thirdparty/gettext.git/commit
xgettext: Fix abort when outputting a msgid that has an invalid UTF-8 character.
authorBruno Haible <bruno@clisp.org>
Sun, 12 Mar 2023 00:39:57 +0000 (01:39 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 14 Mar 2023 01:57:28 +0000 (02:57 +0100)
commit589731cc1b49bfbb2467b102fba8e1afd2277eef
tree335a8c3c8837dfc54af97e4645ed687fadd2a82a
parent20e263b57a0bb446f1b4fbb0d4979a1db178be62
xgettext: Fix abort when outputting a msgid that has an invalid UTF-8 character.

* gettext-tools/src/xg-encoding.c: Include unistr.h.
(non_utf8_error_message): New function.
(from_current_source_encoding): When xgettext_current_source_encoding is
"UTF-8", check that the string is well-formed UTF-8.
* gettext-tools/tests/xgettext-c-8: New file.
* gettext-tools/tests/xgettext-python-5: New file.
* gettext-tools/tests/xgettext-elisp-3: New file.
* gettext-tools/tests/xgettext-librep-3: New file.
* gettext-tools/tests/xgettext-awk-3: New file.
* gettext-tools/tests/xgettext-lua-3: New file.
* gettext-tools/tests/xgettext-vala-4: New file.
* gettext-tools/tests/xgettext-php-5: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add them.
gettext-tools/src/xg-encoding.c
gettext-tools/tests/Makefile.am
gettext-tools/tests/xgettext-awk-3 [new file with mode: 0755]
gettext-tools/tests/xgettext-c-8 [new file with mode: 0755]
gettext-tools/tests/xgettext-elisp-3 [new file with mode: 0755]
gettext-tools/tests/xgettext-librep-3 [new file with mode: 0755]
gettext-tools/tests/xgettext-lua-3 [new file with mode: 0755]
gettext-tools/tests/xgettext-php-5 [new file with mode: 0755]
gettext-tools/tests/xgettext-python-5 [new file with mode: 0755]
gettext-tools/tests/xgettext-vala-4 [new file with mode: 0755]