pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MacOS: iconv library behaves differently starting from MacOS 14 Somo


From: Ben Pfaff
Subject: Re: MacOS: iconv library behaves differently starting from MacOS 14 Somona - skip test "convert invalid UTF-8 to ISO-8859-1“
Date: Sat, 4 Nov 2023 13:01:57 -0700

It looks to me like Mac OS is returning EOPNOTSUPP when it should
return EILSEQ.  Would you mind trying the following patch?

diff --git a/src/libpspp/i18n.c b/src/libpspp/i18n.c
index 5e9aa0d59c..7697ac614c 100644
--- a/src/libpspp/i18n.c
+++ b/src/libpspp/i18n.c
@@ -214,6 +215,7 @@ try_recode (struct converter *cvtr, char fallbackchar,
             return out - 1 - out_;

           case EILSEQ:
+          case EOPNOTSUPP:
             if (outbytes == 0)
               return -E2BIG;
             if (!fallbackchar)


On Sat, Nov 4, 2023 at 11:53 AM Friedrich Beckmann
<friedrich.beckmann@gmx.de> wrote:
>
> Hi Ben,
>
> pspp uses the native iconv library from Apple on MacOS. Apple has changed 
> that library from MacOS 13 to MacOS 14. As a result the returned error codes 
> seem different. That is the reason why the test "convert invalid UTF-8 to 
> ISO-8859-1“ fails on MacOS 14. The problem is discussed here:
>
> https://github.com/fredowski/homebrew-pspp/issues/5#issuecomment-1793464558
>
> I made a patch to disable that test on MacOS such that the regression will 
> work again on MacOS 14. I hope until Apple fixes the iconv library.
>
> Cheers
>
> Fritz



reply via email to

[Prev in Thread] Current Thread [Next in Thread]