Edit report at http://bugs.php.net/bug.php?id=51694&edit=1
ID: 51694 Updated by: der...@php.net Reported by: mkvirtanen at gmail dot com Summary: Extra characters in strftime %b -Status: Assigned +Status: Bogus Type: Bug Package: Date/time related Operating System: Centos 5.x PHP Version: 5.3.2 Assigned To: derick New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php This is not a bug, for some odd reason the locale for Finnish specifies a non-breaking space behind the month. I get the same output: der...@kossu:~$ php -r 'setlocale(LC_ALL, "fi_FI.utf8" ); echo strftime("%a, %d %b %Y %H:%M:%S %Z"), "\n";' | hexdump -C 00000000 70 65 2c 20 33 30 20 68 75 68 74 69 c2 a0 20 32 |pe, 30 huhti.. 2| 00000010 30 31 30 20 30 30 3a 31 37 3a 32 39 20 42 53 54 |010 00:17:29 BST| 00000020 0a |.| 00000021 c2 a0 is UTF-8 for character 160, which is the non-breaking space. Previous Comments: ------------------------------------------------------------------------ [2010-04-29 09:44:15] mkvirtanen at gmail dot com Description: ------------ Creating a date for local (fiFI) format $dte = strftime("%a, %d %b %Y %H:%M:%S %Z"); adding it to email headers $headers[] = "Date: $dte"; Results in an extra character after (or in) %b: Date: ti, 27 huhti� 2010 13:07:18 CDT The character seems to be chr(240), at least as reported by Amavis and some email systems seem to reject the message (otherwise pure UTF8) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=51694&edit=1