
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tlug] Doing kanji and stuff in email headers
On Mon, 30 Jul 2012 22:43:51 +0900, Brian Chandler
<brian@example.com> wrote:
> Name in to header: '=?UTF-8?B?'.base64_encode($name).'?='
>
> But I'm concerned that if I do this where it isn't necessary, some "spam
> filter" will not like it; so I wonder
>
> o What's the neatest way to decide if it's necessary? OR
> o Can I after all just use UTF-8 because it's ok nowadays?
The way I always used to go about it is as follows:
$ascii_name = iconv('UTF-8','US-ASCII',$name);
// this will return FALSE if $name cannot be converted to US-ASCII
if ( $ascii_name === FALSE ) {
// do your conversion thing here
}
else {
// just use $name as is
}
--
Godwin Stewart <gstewart@example.com>
Home |
Main Index |
Thread Index