src/iconv.c

Branch


Log

Author Commit Date CI Message
Bruno Haible 8d618a87 2024-12-15T12:56:32 Prepare for version 1.18. * configure.ac: Bump version number to 1.18. * include/iconv.h.in (_LIBICONV_VERSION): Likewise. * lib/Makefile.in (LIBICONV_VERSION_INFO): Bump to 9:0:7. * src/iconv.c (print_version): Update copyright year. * windows/iconv.rc: Likewise. * windows/libiconv.rc: Likewise. * README: Update download link.
Collin Funk 09865086 2024-08-13T20:51:25 Prefer #include <...> for system headers. See <https://www.gnu.org/software/gnulib/manual/html_node/Style-of-_0023include-statements.html>. * gnulib-local/lib/xmalloc.c: Include <error.h>. * src/iconv.c: Likewise.
Bruno Haible e613b130 2024-07-12T14:06:43 Assume wchar_t. * include/iconv.h.in (iconv_wchar_mb_to_wc_fallback, iconv_wchar_wc_to_mb_fallback): Assume HAVE_WCHAR_T is 1. * src/iconv.c (ilseq_wchar_subst_buffer, subst_mb_to_wc_fallback, subst_wc_to_mb_fallback, main): Likewise. * configure.ac (HAVE_WCHAR_T): Remove variable. (gt_TYPE_WCHAR_T): Remove invocation.
Bruno Haible 5bddef71 2024-06-11T23:51:44 POSIX compliance: Interpret '-' file name as standard input. Reported by Brian Inglis at <https://savannah.gnu.org/bugs/?65874>. * src/iconv.c (main): Recognize the argument '-' as denoting standard input.
Mike Fulton 153d4079 2023-05-12T22:41:08 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.
Bruno Haible 19b6af5e 2023-04-03T04:12:01 Allow overriding the newline conversion for EBCDIC encodings. Reported by Mike Fulton <mikefultonpersonal@gmail.com> in <https://lists.gnu.org/archive/html/bug-gnu-libiconv/2023-04/msg00009.html>. * include/iconv.h.in (ICONV_SURFACE_NONE, ICONV_SURFACE_EBCDIC_ZOS_UNIX): New macros. (ICONV_GET_FROM_SURFACE, ICONV_SET_FROM_SURFACE, ICONV_GET_TO_SURFACE, ICONV_SET_TO_SURFACE): New macros. * lib/converters.h (struct conv_struct): Add the fields isurface, osurface. (swap_x15_x25): New macro. * lib/iconv.c (iconv_open, iconv_open_into): Add local variables from_surface, to_surface. (ALL_SURFACES): New macro. (iconvctl): Adjust ICONV_TRIVIALP implementation. Implement the ICONV_{GET,SET}_{FROM,TO}_SURFACE requests. * lib/iconv_open1.h: Parse a /ZOS_UNIX surface specifier. Set from_surface, to_surface. * lib/iconv_open2.h: Copy the values of from_surface, to_surface into the conversion descriptor. * lib/ebcdic*.h (*_mbtowc): Test the isurface. If requested, call swap_x15_x25 right after fetching an input byte. (*_wctomb): Test the osurface. If requested, call swap_x15_x25 right before storing an output byte. * man/iconvctl.3 (REQUEST VALUES): Document the ICONV_{GET,SET}_{FROM,TO}_SURFACE requests. * src/iconv.c (main): If ICONV_EBCDIC_ZOS_UNIX is set, set the from/to surfaces accordingly. * man/iconv.1 (ENVIRONMENT): New section. * tests/check-ebcdic: New file. * tests/Makefile.in (check): Invoke it. (SOURCE_FILES): Add it. * NEWS: Mention the new functionality.
Bruno Haible c31a1460 2022-02-12T13:50:15 Prepare for version 1.17. * configure.ac: Bump version number to 1.17. * include/iconv.h.in (_LIBICONV_VERSION): Likewise. * lib/Makefile.in (LIBICONV_VERSION_INFO): Bump to 9:0:7. * src/iconv.c (print_version): Update copyright year. * windows/iconv.rc: Likewise. * windows/libiconv.rc: Likewise. * README: Update download link.
Bruno Haible 59a168c6 2019-05-11T22:00:26 Update bug reporting instructions.
Bruno Haible 24729046 2019-04-26T20:59:03 Prepare for version 1.16.
Bruno Haible 4d2b066e 2019-01-06T10:12:00 Revisit handling of file descriptors closed by the parent process.
Bruno Haible e54fc9c1 2018-09-17T18:28:56 Prefer https URLs where possible.
Bruno Haible 941f63af 2017-01-30T23:48:37 Prepare for version 1.15.
Bruno Haible 3347685a 2016-11-25T11:53:26 Prepare for version 1.15.
Bruno Haible bd21fb8e 2016-10-01T18:29:43 Fix bug #41187.
Bruno Haible 6b00cc70 2012-01-26T12:37:51 Modernize quoting.
Bruno Haible 4d036b9a 2011-08-07T15:16:56 Prepare for version 1.14.
Bruno Haible 4c5433e1 2011-07-03T22:04:21 Improve interactive behaviour of iconv program.
Bruno Haible b918f35d 2011-07-03T17:43:06 Fix interactive behaviour of iconv program.
Bruno Haible ec9129d5 2009-03-26T12:10:13 Update to GPLv3+.
Bruno Haible a3272314 2009-03-26T03:27:28 Bump year.
Bruno Haible 942d4453 2008-04-06T09:11:05 Bump copyright year.
Bruno Haible f952c1c7 2007-07-07T17:09:24 Update after cjk.h was moved to gnulib.
Bruno Haible 417fde27 2007-06-30T22:50:31 Use the standard --version output.
Bruno Haible 8875f132 2007-06-30T21:23:41 Reuse a translator comment from GNU gettext.
Bruno Haible a7b2866b 2007-06-30T14:44:27 Provide many comments for translators.
Bruno Haible fa56313a 2007-05-27T20:14:55 Change the default value of ICONV_CONST to empty.
Bruno Haible 60ce7b6c 2007-02-19T02:37:43 Update after gnulib changes.
Bruno Haible 6e184f1f 2006-07-31T16:10:52 Assume <locale.h>, <stddef.h>, <stdlib.h>, <string.h> all exist.
Bruno Haible 8d6cc11c 2006-07-04T13:34:13 Fix error messages.
Bruno Haible fccc58a2 2006-06-10T17:24:50 Fix link error of iconv_no_i18n.
Bruno Haible fdae0da5 2006-01-23T13:33:50 Ensure that iconv_no_i18n does not depend on libintl.
Bruno Haible 54f6c0ab 2006-01-23T13:26:44 Use error() instead of fprintf on stderr.
Bruno Haible 422b3b1d 2006-01-23T13:25:49 New feature: character-dependent substitutions.
Bruno Haible 3a95ad61 2006-01-23T13:23:00 Accept long options.
Bruno Haible 49aea841 2005-12-29T20:23:24 Update year in --version output.
Bruno Haible 45bd190c 2005-05-19T17:14:19 Update FSF postal address.
Bruno Haible 218d46eb 2005-03-14T11:36:42 More reliable error checking.
Bruno Haible 7c821f47 2005-03-14T11:34:47 Prettier output of error messages.
Bruno Haible e6158843 2005-03-14T11:34:08 Improved error messages with line and column number.
Bruno Haible fcab6708 2005-02-07T12:19:51 Make more user-friendly.
Bruno Haible a6223a6b 2004-07-17T17:05:41 Interpret -- as end of options.
Bruno Haible 12d862d7 2004-01-22T19:33:40 Make --binary the default.
Bruno Haible 2aec7402 2003-04-15T09:41:45 Use standards binary-io code.
Bruno Haible 99e22dda 2003-04-14T15:28:52 Support for relocatable installation.
Bruno Haible 13b72c98 2002-09-02T13:08:06 Make it compile on mingw32.
Bruno Haible 485041c8 2002-05-29T14:09:04 Tricky "make install", due to dependencies iconv -> libintl -> libiconv.
Bruno Haible 53110b18 2002-04-30T14:40:23 Start using gettext.
Bruno Haible dc5f739c 2002-01-16T12:22:10 New options -c, -s, -l.
Bruno Haible 4781945e 2001-03-21T21:16:44 Name change.
Bruno Haible d5ac1c2b 2001-03-20T20:35:46 Update copyright notice.
Bruno Haible 64df57ae 2001-03-05T14:55:52 Tweak DJGPP support.
Bruno Haible cdae1a8f 2001-02-26T13:40:58 Avoid warnings about iconv()'s second argument.
Bruno Haible 37ec8877 2001-02-26T13:29:58 Improve support for binary mode on DJGPP.
Bruno Haible fc8e3792 2001-02-22T16:46:29 Make -f and -t options optional.
Bruno Haible 55dbc7f3 2000-12-02T00:44:49 On DOS like systems, perform the test suite in binary mode.
Bruno Haible 0750d976 2000-12-02T02:33:05 Implement --help and --version.
Bruno Haible a615528b 2000-11-23T19:54:07 Move src/ to lib/, and install the iconv program.
Bruno Haible 22cefdf1 2000-11-23T19:56:01 Move src/ to lib/ and tests/iconv.c to src/iconv.c.
Bruno Haible 1ca2adf0 2000-11-20T18:30:25 Use ucs4_t instead of locally defined wchar_t.
Bruno Haible fdd8e49f 2000-11-20T18:26:50 Transliteration is now off by default.
Bruno Haible d51d26bc 2000-11-20T18:33:47 Add support for locale dependent "char" and "wchar_t" encodings.
Bruno Haible aaebc789 2000-03-07T14:16:40 Provide all encodings used by AIX locales. Simplify TIS-620.
Bruno Haible c5e6259f 2000-03-13T14:46:54 Find another way to deal with system dependent aliases.
Bruno Haible 9a297f9c 2000-02-24T20:53:03 Fix treatment of "output buffer full" condition.
Bruno Haible d215f82d 2000-02-15T13:39:56 Avoid compilation error with C++ compiler.
Bruno Haible c37afd43 2000-01-24T13:06:57 Upgrade to libiconv-1.1.
Bruno Haible 00e960fc 2000-01-04T21:56:56 Upgrade to libiconv-1.0.
Bruno Haible 3af9cd39 1999-12-31T12:50:49 Import from libiconv-0.3.