On z/OS, set a charset tag on iconv's output file.
commit153d40792133b07e87f0f3f3a66006e0f0c48251
authorMike Fulton <mikefultonpersonal@gmail.com>
Fri, 12 May 2023 20:41:08 +0000 (12 22:41 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 12 May 2023 20:41:08 +0000 (12 22:41 +0200)
tree0e7923eed42d79e35e27d4c151102a5c2f961d74
parent33f08ec1e0fc1e8203a3d81e9161894dc5793908
On z/OS, set a charset tag on iconv's output file.

For the concept of charset tags as external metadata on z/OS files, see
<https://lists.gnu.org/archive/html/bug-gnu-libiconv/2023-04/msg00021.html>.

* src/zos-tag.h: New file.
* src/iconv.c: Include zos-tag.h.
(convert): Add a 'tocode' parameter. On z/OS, turn off auto-conversion
and tag the output file.
(main): Update callers.
* tests/check-ebcdic: On z/OS, make all test files initially untagged.
* tests/check-tag: New file.
* tests/Makefile.in (check): Pass the host_os to check-ebcdic. Invoke
check-tag.
ChangeLog
src/iconv.c
src/zos-tag.h [new file with mode: 0644]
tests/Makefile.in
tests/check-ebcdic
tests/check-tag [new file with mode: 0644]