From 76d4c1a98efaab7d5d06edcde2ede189aa9b39e6 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Wed, 28 Aug 2002 07:45:17 +0000 Subject: fixes a crash on systems that dont have utf7 in iconv. 2002-08-28 Not Zed * providers/imap/camel-imap-utils.c (imap_mailbox_encode): Chagned to use camel_utf8_utf7 code. (imap_mailbox_decode): As above, using camel_utf8_utf7. 'UTF-7' isn't a widely support iconv() codeset, and besides the new code is simpler. * camel-utf8.[ch]: robust utilities for working with utf8 and utf7. svn path=/trunk/; revision=17886 --- camel/camel-utf8.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 camel/camel-utf8.h (limited to 'camel/camel-utf8.h') diff --git a/camel/camel-utf8.h b/camel/camel-utf8.h new file mode 100644 index 0000000000..7d6fac5410 --- /dev/null +++ b/camel/camel-utf8.h @@ -0,0 +1,16 @@ + +#ifndef _CAMEL_UTF8_H +#define _CAMEL_UTF8_H + +void camel_utf8_putc(unsigned char **ptr, guint32 c); +guint32 camel_utf8_getc(const unsigned char **ptr); + +/* utility func for utf8 gstrings */ +void g_string_append_u(GString *out, guint32 c); + +/* convert utf7 to/from utf8, actually this is modified IMAP utf7 */ +char *camel_utf7_utf8(const char *ptr); +char *camel_utf8_utf7(const char *ptr); + + +#endif /* ! _CAMEL_UTF8_H */ -- cgit v1.2.3