I have successfully changed the email sending with Big5 encoded.
Please do the following 2 things:
1. Add a new function to the file "include/common.inc":
function drupal_convert_to_big5($data, $encoding='utf-8') {
if (function_exists('iconv')) {
$out = @iconv($encoding, 'big5', $data);
}
else if (function_exists('mb_convert_encoding')) {
$out = @mb_convert_encoding($data, 'big5', $encoding);
}
else if (function_exists('recode_string')) {
$out = @recode_string($encoding .'..big5', $data);
}
else {
watchdog('php', t("Unsupported encoding '%s'. Please install iconv, GNU recode or mbstring for PHP.", $encoding), WATCHDOG_ERROR);
return FALSE;
}
return $out;
}
// I would suggest adding the above right under the function "function drupal_convert_to_utf8($data, $encoding)" for easy debugging in the future
2. Replace the function "user_mail" inside the file "modules/user.module" with this:
function user_mail($mail, $subject, $message, $header) {
if (variable_get('smtp_library', '') && file_exists(variable_get('smtp_library', ''))) {
include_once variable_get('smtp_library', '');
return user_mail_wrapper($mail, $subject, $message, $header);
}
else {
/*
** Note: if you are having problems with sending mail, or mails look wrong
** when they are received you may have to modify the str_replace to suit
** your systems.
** - \r\n will work under dos and windows.