#47868 [NEW]: Special apostrophe character stripped from subject

From: Date: Wed, 01 Apr 2009 21:30:37 +0000
Subject: #47868 [NEW]: Special apostrophe character stripped from subject
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-135467@lists.php.net to get a copy of this message
From: cconnors at online-buddies dot com Operating system: XPSP2 PHP version: 5.2.9 PHP Bug Type: Mail related Bug description: Special apostrophe character stripped from subject 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' . " <" . 'noreply@foo.net' . ">\n" . "Reply-To: " . 'noreply@foo.net' . "\n" . "Content-type: text/plain; charset=UTF-8\n\n"; mail('fake@foo.net', 'french d’avoir' , 'french d’avoir', $header); Expected result: ---------------- Should get a message with: subject: french d’avoir body: french d’avoir Actual result: -------------- Actually get: subject: french davoir body: french d’avoir -- Edit bug report at http://bugs.php.net/?id=47868&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47868&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47868&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47868&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47868&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47868&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47868&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47868&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47868&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47868&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47868&r=support Expected behavior: http://bugs.php.net/fix.php?id=47868&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47868&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47868&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47868&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47868&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=47868&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47868&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47868&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47868&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47868&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47868&r=mysqlcfg

« previous php.bugs (#135467) next »