From: [EMAIL PROTECTED]
Operating system: red hat Linux 6.2
PHP version: 4.3.0RC1
PHP Bug Type: *Mail Related
Bug description: Bad subject line when using JIS encoding
Hi Ya,
Basically I am using
PHP 4.3.0RC1 (but I have also noticed the same thing with PHP 4.3.0PR2 )
on Red Hat Linux 6.2
with Sendmail 8.9.3
I am basically trying to send a mail in Japanese,
I first encode the text into JIS then simply send as normal,
i.e.
<?
$subjectja=mb_convert_encoding("�f�C���[���|�[�g","JIS","SJIS"); //
converts the SHIFT_JIS to JIS
echo mb_detect_encoding($subjectja); // Check it is encoded properly
which it is
echo $subjectja; // Check the Browser has no problems with the encoding
and works fine
mail($email,$subjectja,"test->".$subjectja,"Content-Type:
text/plain;charset=\"iso-2022-jp\"\nContent-Transfer-Encoding: 7bit"); //
mail
?>
however the subject line does not appear correctly. On viewing the email
source I noticed that it is seemingly removing some characters from the
Subject line JIS,
Subject: $B%G%$%j!<%l%]!<%H (B <--- this is the resulting subject
line which is broken
test->$B%G%$%j!<%l%]!<%H(B <--- this is the email body which works
fine
$B%G%$%j!<%l%]!<%H (B
$B%G%$%j!<%l%]!<%H(B
slightly different. Also if you take out the "test->" on the body part the
body of the email will not to work.
p.s. there is no problems with 4.0,4.1 or 4.2
thanks,
Malek
--
Edit bug report at http://bugs.php.net/?id=20529&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=20529&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=20529&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=20529&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=20529&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=20529&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=20529&r=support
Expected behavior: http://bugs.php.net/fix.php?id=20529&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=20529&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=20529&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=20529&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20529&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=20529&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=20529&r=isapi