From: Aki Tuomi Date: Thu, 28 Apr 2016 11:03:41 +0000 (+0300) Subject: lib-charset: Do not use //IGNORE on non-GNU system X-Git-Tag: 2.3.0.rc1~3922 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f086fd06591eafd4fb96cdc33ea8fb1b95f18e59;p=thirdparty%2Fdovecot%2Fcore.git lib-charset: Do not use //IGNORE on non-GNU system --- diff --git a/src/lib-charset/test-charset.c b/src/lib-charset/test-charset.c index 18da108464..6ba72bb93a 100644 --- a/src/lib-charset/test-charset.c +++ b/src/lib-charset/test-charset.c @@ -105,7 +105,12 @@ static void test_charset_iconv(void) } /* Use //IGNORE just to force handling to be done by iconv instead of our own UTF-8 routines. */ - test_charset_utf8_common("UTF-8//IGNORE"); + /* check if //IGNORE is supported by ICONV */ + if (charset_to_utf8_str("UTF-8//IGNORE", NULL, "", str, &result) < 0) + test_charset_utf8_common("UTF-8"); + else + test_charset_utf8_common("UTF-8//IGNORE"); + test_end(); test_end(); } static void test_charset_iconv_crashes(void)