Mercurial > dovecot > core-2.2
changeset 20093:70d7d3f650d4
lib-charset: Do not use //IGNORE on non-GNU system
author | Aki Tuomi <aki.tuomi@dovecot.fi> |
---|---|
date | Thu, 28 Apr 2016 14:03:41 +0300 |
parents | b3daa87593e9 |
children | 2baf6c4274f1 |
files | src/lib-charset/charset-iconv.c src/lib-charset/test-charset.c |
diffstat | 2 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-charset/charset-iconv.c Fri Apr 29 02:33:58 2016 +0300 +++ b/src/lib-charset/charset-iconv.c Thu Apr 28 14:03:41 2016 +0300 @@ -24,6 +24,8 @@ if (charset_is_utf8(charset)) cd = (iconv_t)-1; else { + if (strcmp(charset, "UTF-8//TEST") == 0) + charset = "UTF-8"; cd = iconv_open("UTF-8", charset); if (cd == (iconv_t)-1) return -1;
--- a/src/lib-charset/test-charset.c Fri Apr 29 02:33:58 2016 +0300 +++ b/src/lib-charset/test-charset.c Thu Apr 28 14:03:41 2016 +0300 @@ -105,7 +105,7 @@ } /* 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"); + test_charset_utf8_common("UTF-8//TEST"); test_end(); } static void test_charset_iconv_crashes(void)