Results 1 to 1 of 1

Thread: [Resolved] Downloading File with Unicode File Name Causes Problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2006
    Posts
    4

    [Resolved] Downloading File with Unicode File Name Causes Problem

    In order to track file download rates, for all the files available for download on my web page I've placed a link to an ASP page which increments the download counter. Within the same page, it reads the binary data from file and uses following code to display the prompt window so user can either choose to save or open the file.

    VB Code:
    1. Response.CharSet = "UTF-8"
    2. Response.AddHeader "Content-disposition", "attachment;filename=" & stFileName
    3. Response.BinaryWrite(bytFile)
    4. Response.Flush
    5. Response.Clear

    The code works fine but whenever the file name contains unicode characters, file name displayed and saved on the prompt window is not the original name, rather it displayed some alphanumeric characters.

    If I use Response.Redirect to the given file name, the prompt windows gives the correct result, but I cannot prevent user browser from opening the know MIME types within the browser itself.

    I would like to find out how I can solve the unicode filename problem.

    Thanks in advance!
    Last edited by binary_100110; Nov 7th, 2006 at 01:29 AM.

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