Mercurial > pidgin
diff src/protocols/msn/msn-utils.c @ 19828:e45fae8209c3
[gaim-migrate @ 17045]
add a MIME encode function,processing utf-8 and base64 encode
committed by MaYuan<mayuan2006@gmail.com>
committer: Ethan Blanton <elb@pidgin.im>
| author | Ma Yuan <mayuan2006@gmail.com> |
|---|---|
| date | Sat, 26 Aug 2006 13:03:11 +0000 |
| parents | a8d00b8dae40 |
| children |
line wrap: on
line diff
--- a/src/protocols/msn/msn-utils.c Sat Aug 26 11:30:40 2006 +0000 +++ b/src/protocols/msn/msn-utils.c Sat Aug 26 13:03:11 2006 +0000 @@ -146,6 +146,18 @@ g_free(cur); } +/*encode the str to RFC2047 style + * Currently only support the UTF-8 and base64 encode + */ +char * +msn_encode_mime(char *str) +{ + char *base64; + + base64 = gaim_base64_encode(str,strlen(str)); + return g_strdup_printf("=?utf-8?B?%s?=",base64); +} + /* * We need this because we're only supposed to encode spaces in the font * names. gaim_url_encode() isn't acceptable.
