This time the patch is actually attached... Attached is a suggested patch to make it possible to set the CHARSET parameter with imap_mail_compose(). Currently, all body parts with Content-Type = TYPETEXT get CHARSET=US-ASCII. Usage: $body[1][type] = TYPETEXT; $body[1][charset] = "iso-8859-1"; Chuck, if there are no objections to the patch, can you commit it? Best regards, /Johan Ekenberg
--- php_imap.c.bak Fri May 4 19:47:01 2001 +++ php_imap.c Wed May 16 23:18:56 2001 @@ -3255,6 +3255,14 @@ convert_to_long_ex(pvalue); bod->encoding = (short) Z_LVAL_PP(pvalue); } + if (zend_hash_find(Z_ARRVAL_PP(data), "charset", sizeof("charset"), +(void **) &pvalue)== SUCCESS) { + convert_to_string_ex(pvalue); + tmp_param = mail_newbody_parameter(); + tmp_param->value = cpystr(Z_STRVAL_PP(pvalue)); + tmp_param->attribute = "CHARSET"; + tmp_param->next = bod->parameter; + bod->parameter = tmp_param; + } if (zend_hash_find(Z_ARRVAL_PP(data), "subtype", sizeof("subtype"), (void **) &pvalue)== SUCCESS) { convert_to_string_ex(pvalue); bod->subtype = cpystr(Z_STRVAL_PP(pvalue)); @@ -3332,6 +3340,14 @@ if (zend_hash_find(Z_ARRVAL_PP(data), "encoding", sizeof("encoding"), (void **) &pvalue)== SUCCESS) { convert_to_long_ex(pvalue); bod->encoding = (short) Z_LVAL_PP(pvalue); + } + if (zend_hash_find(Z_ARRVAL_PP(data), "charset", +sizeof("charset"), (void **) &pvalue)== SUCCESS) { + convert_to_string_ex(pvalue); + tmp_param = mail_newbody_parameter(); + tmp_param->value = cpystr(Z_STRVAL_PP(pvalue)); + tmp_param->attribute = "CHARSET"; + tmp_param->next = bod->parameter; + bod->parameter = tmp_param; } if (zend_hash_find(Z_ARRVAL_PP(data), "subtype", sizeof("subtype"), (void **) &pvalue)== SUCCESS) { convert_to_string_ex(pvalue);
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]