note 74750 added to ref.mbstring
| From: | Smelly at osu1 dot php dot net | Date: | Thu, 26 Apr 2007 05:09:25 +0000 |
| Subject: | note 74750 added to ref.mbstring | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-125876@lists.php.net to get a copy of this message | ||
Below is some code to output a UTF-8 encoded CSV in a way understandable by Excel. It requires iconv
instead of mbstring.
header("Content-type: application/octet-stream");
header("Content-Transfer-Encoding: binary");
header("Content-Disposition: attachment; filename=report.xls");
// assume $tmpString contains UTF-8 encoded CSV:
$tmpString = iconv ( 'UTF-8', 'UTF-16LE//IGNORE', $tmpString );
print chr(255).chr(254).$tmpString;
----
Server IP: 203.16.234.20
Probable Submitter: 203.214.70.220
----
Manual Page -- http://www.php.net/manual/en/ref.mbstring.php
Edit -- https://master.php.net/note/edit/74750
Del: integrated -- https://master.php.net/note/delete/74750/integrated
Del: useless -- https://master.php.net/note/delete/74750/useless
Del: bad code -- https://master.php.net/note/delete/74750/bad+code
Del: spam -- https://master.php.net/note/delete/74750/spam
Del: non-english -- https://master.php.net/note/delete/74750/non-english
Del: in docs -- https://master.php.net/note/delete/74750/in+docs
Del: other reasons-- https://master.php.net/note/delete/74750
Reject -- https://master.php.net/note/reject/74750
Search -- https://master.php.net/manage/user-notes.php