note 110249 deleted from function.header by danbrown
| From: | danbrown@php.net | Date: | Wed, 17 Oct 2012 21:30:55 +0000 |
| Subject: | note 110249 deleted from function.header by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-191413@lists.php.net to get a copy of this message | ||
Note Submitter: i at myself dot me
----
Before it was pointed out that there are problems with Content-Disposition and using UTF-8
filenames. The proposed solutions was
<?php
$simple = 'file.jpg';
$fancy = 'my ⬠balance ¤ ½.jpg';
header('Content-Disposition: attachment; filename='.$simple.';
filename*=utf-8\\'\\''.rawurlencode($fancy));
?>
but this can lead to problems. For example, if you use % in the filename, it gets converted to %25,
but Internet Explorer (v.9) does not decode that. It works for Chrome however.