Edit report at https://bugs.php.net/bug.php?id=47868&edit=1
ID: 47868 Comment by: astewart at online-buddies dot com Reported by: cconnors at online-buddies dot com Summary: Special apostrophe character stripped from subject Status: Open Type: Bug Package: Mail related Operating System: win32 only - XPSP2 PHP Version: 5.2.9 Block user comment: N Private report: N New Comment: This is not a bug. The header field must be encoded if you want non-ASCII characters in it, as in: Subject: =?iso-8859-1?Q?french d=92avoir?= Previous Comments: ------------------------------------------------------------------------ [2009-04-01 21:30:37] cconnors at online-buddies dot com Description: ------------ The following character () is automatically stripped from a subject, but not the body using mail(). Quick fix is... $subj = str_replace('', '\'', $template->getSubject()); But it's not EXACTLY the same character. I've played around with the header, and cannot get it to work with UTF-8. Reproduce code: --------------- header = "From: ". 'noreply' . " <" . 'nore...@foo.net' . ">\n" . "Reply-To: " . 'nore...@foo.net' . "\n" . "Content-type: text/plain; charset=UTF-8\n\n"; mail('f...@foo.net', 'french davoir' , 'french davoir', $header); Expected result: ---------------- Should get a message with: subject: french davoir body: french davoir Actual result: -------------- Actually get: subject: french davoir body: french davoir ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=47868&edit=1