Mercurial > dovecot > core-2.2
diff src/lib-charset/charset-utf8.c @ 18149:0e74934072e0
lib-charset: Added charset_utf8_to_utf8_begin() wrapper function.
It's never supposed to fail, so it makes it nicer for the callers who need
to use it.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 15 Jan 2015 01:05:13 +0200 |
parents | 7459c0891a85 |
children | 3d9ec121dc81 |
line wrap: on
line diff
--- a/src/lib-charset/charset-utf8.c Thu Jan 15 01:03:58 2015 +0200 +++ b/src/lib-charset/charset-utf8.c Thu Jan 15 01:05:13 2015 +0200 @@ -32,6 +32,16 @@ return 0; } +struct charset_translation * +charset_utf8_to_utf8_begin(normalizer_func_t *normalizer) +{ + struct charset_translation *trans; + + if (charset_to_utf8_begin("UTF-8", normalizer, &trans) < 0) + i_unreached(); + return trans; +} + #ifndef HAVE_ICONV struct charset_translation {