diff options
author | Bruno Haible <bruno@clisp.org> | 2023-03-10 23:32:24 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2023-03-14 02:57:22 +0100 |
commit | 53a2b763b8dc516bd20258ea5aead80bc7ab7cf3 (patch) | |
tree | 6a3048efd08cf8c0b2cb54d8d1f6715e97daa0e7 /gettext-tools/tests/xgettext-po-4 | |
parent | f59e9441caa599a4e010f49e7a3480d765e6d315 (diff) | |
download | gettext-53a2b763b8dc516bd20258ea5aead80bc7ab7cf3.tar.gz |
xgettext: In language PO, handle non-ASCII non-UTF-8 input files correctly.
* gettext-tools/src/x-po.c: Include msgl-iconv.h, msgl-ascii.h, po-charset.h.
(extract): If a header charset is present, convert the messages to UTF-8;
otherwise verify that they are all ASCII.
* gettext-tools/tests/xgettext-po-3: New file.
* gettext-tools/tests/xgettext-po-4: New file.
* gettext-tools/tests/testdata/xg-po-3.po: New file.
* gettext-tools/tests/testdata/xg-po-4.po: New file.
* gettext-tools/tests/Makefile.am (TESTS, EXTRA_DIST): Add them.
* NEWS: Mention the change.
Diffstat (limited to 'gettext-tools/tests/xgettext-po-4')
-rwxr-xr-x | gettext-tools/tests/xgettext-po-4 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gettext-tools/tests/xgettext-po-4 b/gettext-tools/tests/xgettext-po-4 new file mode 100755 index 000000000..6ed4e88e3 --- /dev/null +++ b/gettext-tools/tests/xgettext-po-4 @@ -0,0 +1,12 @@ +#! /bin/sh +. "${srcdir=.}/init.sh"; path_prepend_ . ../src + +# Test PO extractor with non-ASCII input file without header entry. + +: ${XGETTEXT=xgettext} +${XGETTEXT} --no-location -d xg-po-4.tmp "$wabs_srcdir"/testdata/xg-po-4.po 2>xg-po-so-4.err +result=$? +cat xg-po-so-4.err +test $result = 1 || Exit 1 + +exit 0 |