lib/utf32.h

Branch


Log

Author Commit Date CI Message
Bruno Haible a4c1470b 2024-12-13T23:55:13 Distinguish byte-order state and shift-state. Reported by Tomas Kalibera <tomas.kalibera@gmail.com> in <https://lists.gnu.org/archive/html/bug-gnu-libiconv/2024-12/msg00000.html>. * lib/converters.h (struct conv_struct): Add field 'ibyteorder'. * lib/iconv_open2.h: Initialize the ibyteorder field. * lib/ucs2.h (ucs2_mbtowc): Use the ibyteorder field instead of the istate field. * lib/ucs4.h (ucs4_mbtowc): Likewise. * lib/utf16.h (utf16_mbtowc): Likewise. * lib/utf32.h (utf32_mbtowc): Likewise. * tests/test-bom-state.c: New file. * tests/Makefile.in (check): Run test-bom-state. (test-bom-state, test-bom-state.@OBJEXT@): New targets. (clean): Remove test-bom-state. (SOURCE_FILES): Add test-bom-state.c. * NEWS: Mention the change.
Bruno Haible eed6782c 2024-10-05T02:24:01 Fix undefined behaviour caused by shifting (unsigned char) << 24. Reported by Tim Sweet <tsweet64@protonmail.com> at <https://savannah.gnu.org/bugs/?66289>. * lib/ucs4.h (ucs4_mbtowc): Cast 'unsigned char' values to ucs4_t before shifting them to the left. * lib/ucs4be.h (ucs4be_mbtowc): Likewise. * lib/ucs4le.h (ucs4le_mbtowc): Likewise. * lib/utf32.h (utf32_mbtowc): Likewise. * lib/utf32be.h (utf32be_mbtowc): Likewise. * lib/utf32le.h (utf32le_mbtowc): Likewise.
Bruno Haible 91f96be0 2021-06-06T11:51:12 Change the license of the library from LGPL 2.0 to LGPL 2.1.
Bruno Haible 3acb1179 2020-04-04T14:58:34 Change the license of the library from LGPL 2.0 to LGPL 2.1.
Bruno Haible e54fc9c1 2018-09-17T18:28:56 Prefer https URLs where possible.
Bruno Haible 40924a62 2016-10-14T03:18:05 Use 'size_t', not 'int', for the length of a string.
Bruno Haible 48f31c74 2012-02-12T20:54:51 Replace FSF snail-mail address with URL.
Bruno Haible f14f82d1 2011-11-28T02:23:25 Fix bug with error handling in UCS-2, UCS-4, UTF-32 decoders.
Bruno Haible bb8f7987 2008-09-07T23:28:41 More consistent behaviour when invalid input is preceded by a shift sequence.
Bruno Haible 45bd190c 2005-05-19T17:14:19 Update FSF postal address.
Bruno Haible db94e408 2001-05-25T19:21:53 Decouple the mbtowc and wctomb calling conventions.
Bruno Haible e91c0ce3 2001-04-12T12:55:41 Add UTF-32 encodings.