Per Jessen schrieb:
Edmund Hertle wrote:
my problem is that I send an e-mail with an attachment (pdf file). I
get the filename out of a mysql table. While using echo or downloading
the file, the filename is showed as expected but as an attachment it
is not properly encoded:
Should be: PC-Beschaffung 2008 (nur für Lehre)
Will be: US-ASCII''PC-Beschaffung%202008%20(nur%20f%C3%BCr%20Lehre)
I think I have to encode the file name and already tried utf8encode
but this didn't help.
I think you need to mime-encode it - mb_encode_mimeheader(). I haven't
tried it with attachments though.
/Per
To me it looks like he only wants the spaces and special-chars in the
filename to be "readable" again.
I guess you submit the filename over the url, by doing that it
automatically gets "url-encoded" (spaces and special chars are converted
to entities).
If that's all you want (convert the entities to chars again), you need
to apply a urldecode() on the filename, then I think you should be fine.
Greets Calle
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php