i18n.c: added EOPNOTSUPP error code for MacOS
authorFriedrich Beckmann <friedrich.beckmann@gmx.de>
Sat, 4 Nov 2023 22:28:40 +0000 (23:28 +0100)
committerFriedrich Beckmann <friedrich.beckmann@gmx.de>
Sat, 4 Nov 2023 22:28:40 +0000 (23:28 +0100)
With MacOS 14 the iconv library was changed by Apple. pspp uses
the native iconv library. There is a different error code
returned when an illegal 0xc0 UTF-8 code is converted. This
results in a failed "convert invalid UTF-8 to ISO-8859-1" test in
the regression. This patch now handles also EOPNOTSUPP.

src/libpspp/i18n.c

index 5e9aa0d59c0104a3bd741e6f7ab33bcfcdb441b6..b70049ca06fe3071985ed8ce25cd1cced8d2a1d8 100644 (file)
@@ -214,6 +214,7 @@ try_recode (struct converter *cvtr, char fallbackchar,
             return out - 1 - out_;
 
           case EILSEQ:
+          case EOPNOTSUPP:
             if (outbytes == 0)
               return -E2BIG;
             if (!fallbackchar)