[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: portability issues with unicodeio
From: |
Bruno Haible |
Subject: |
Re: portability issues with unicodeio |
Date: |
Fri, 10 Jul 2020 09:52:38 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-179-generic; KDE/5.18.0; x86_64; ; ) |
> * tests/test-unicodeio.c (main): In the "C" locale, expect either the
> UTF-8 output or the specified fallback.
Now that we have a unit test, I see that the test fails on NetBSD 9.0. This
patch fixes it.
2020-07-10 Bruno Haible <bruno@clisp.org>
unicodeio: Fix wrong result on NetBSD.
* lib/unicodeio.c (unicode_to_mb): Handle question mark fallback
characters also on NetBSD.
diff --git a/lib/unicodeio.c b/lib/unicodeio.c
index 81fe0dd..b616e3d 100644
--- a/lib/unicodeio.c
+++ b/lib/unicodeio.c
@@ -134,9 +134,10 @@ unicode_to_mb (unsigned int code,
# if !defined _LIBICONV_VERSION && (defined sgi || defined __sgi)
|| (res > 0 && code != 0 && outptr - outbuf == 1 && *outbuf == '\0')
# endif
- /* Solaris 11 iconv() inserts a '?' if it cannot convert. */
-# if !defined _LIBICONV_VERSION && defined __sun
- || (res > 0 && code != 0 && outptr - outbuf == 1 && *outbuf == '?')
+ /* NetBSD iconv() and Solaris 11 iconv() insert a '?' if they cannot
+ convert. */
+# if !defined _LIBICONV_VERSION && (defined __NetBSD__ || defined __sun)
+ || (res > 0 && outptr - outbuf == 1 && *outbuf == '?')
# endif
)
return failure (code, NULL, callback_arg);
- Re: [GNU Bison 3.6.90] testsuite: 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 196 220 221 228 244 245 246 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 549 555 562 567 577 failed, (continued)
- Re: [GNU Bison 3.6.90] testsuite: 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 196 220 221 228 244 245 246 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 549 555 562 567 577 failed, Akim Demaille, 2020/07/06
- Re: [GNU Bison 3.6.90] testsuite: 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 196 220 221 228 244 245 246 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 549 555 562 567 577 failed, Kiyoshi KANAZAWA, 2020/07/06
- portability issues with unicodeio (was: [GNU Bison 3.6.90] testsuite: 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 196 220 221 228 244 245 246 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 549 555 562 567 577 failed), Akim Demaille, 2020/07/08
- Re: portability issues with unicodeio, Bruno Haible, 2020/07/08
- Re: portability issues with unicodeio, Kiyoshi KANAZAWA, 2020/07/08
- Re: portability issues with unicodeio, Kiyoshi KANAZAWA, 2020/07/08
- Re: portability issues with unicodeio, Bruno Haible, 2020/07/08
- Re: portability issues with unicodeio, Kiyoshi KANAZAWA, 2020/07/08
- Re: portability issues with unicodeio, Bruno Haible, 2020/07/09
- Re: portability issues with unicodeio, Akim Demaille, 2020/07/10
- Re: portability issues with unicodeio,
Bruno Haible <=