note 34527 rejected from function.mb-encode-mimeheader by didou

From: Date: Wed, 30 Jul 2003 03:27:25 +0000
Subject: note 34527 rejected from function.mb-encode-mimeheader by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-52985@lists.php.net to get a copy of this message
Note Submitter: gullevek@gullevek.org ---- this function is broken with ISO-2022-JP (I have not tested with others, but 100% with this encoding). If the string has a multibyte character exact at the position where the MIME string gets broken into the next line, this kanji and all after are in mojibake (broken japanese). if you play around with a single byte character exactle at the place where the linebreak comes, everything is fine. I just want to warn everyone. the solution is to insert a whitespace after either 36 single byte or 18 multibyte characters (use the mb_strimwidth function eg). this might get the subject look strange, but at least it doesn't get garbled

« previous php.notes (#52985) next »