Results 1 to 17 of 17

Thread: [RESOLVED] UTF8 and force download script

Threaded View

  1. #4
    Frenzied Member
    Join Date
    Apr 2009
    Location
    CA, USA
    Posts
    1,516

    Re: UTF8 and force download script

    You're not entitled to a solution.

    Anyway, no problems with this working in Firefox. But in IE I see your issue. Some Googling suggests that urlencode() will make IE work... and it does, but then that screws up Firefox. Well based on that, you could do some User Agent sniffing, but that's never a great idea. Let me see if I can't find a better, cross-browser solution...

    Btw, I'd also advise putting quotes around filename:
    Code:
    header("Content-Disposition: attachment; filename=\"".urlencode($ftitle)."\";" );
    If you don't have them, some browsers will cut off anything that comes after a whitespace. You may also want the file extension on filename, or the file the user saves won't have one.

    Edit: nope, can't find a cross-browser solution; on the contrary I've found evidence suggesting that there isn't an interoperable solution (at this time). But if someone else wants to prove me wrong, I welcome it.
    Last edited by SambaNeko; Jan 30th, 2010 at 08:09 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width