Download file with a filename including national characters!

Discussion in 'ASP General' started by Hans, Feb 3, 2005.

  1. Hans

    Hans Guest

    I have an asp site which I try to bet unicode compatible (UTF-8
    codepage=65001). In the site a user can upload documents and I store the
    document on the server in a database. I also store the original filename. If
    this filename contains for example swedish characters like å,ä ö which are
    outside ascii 0-127 i get problems when I try to download the file from
    server-->client.

    In my com+ packages (which are instantiated from asp files) I set the
    following headers/content types

    GetObjectContext("Response").contentType = "application/octet-stream"
    GetObjectContext("Response").AddHeader "Content-Disposition", "attachment;
    filename=" & rs("orgfilename")

    The database value is correct and I have set the codepage in the ASP file to
    65001 (UTF-8). The problem is that the filename shown in the "Save as"
    dialog is incorrect. If the filename only include a-z the filename are shown
    correct.

    I tried adding a charset header but it does not work.
    GetObjectContext("Response").AddHeader "Charset", "UTF-8"

    Browsers used: IE6 sp1.

    Regards
    /Hans
     
    Hans, Feb 3, 2005
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Sm9l?=

    Extract filename from a filename typed by user

    =?Utf-8?B?Sm9l?=, Aug 23, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    1,239
    Travis Murray
    Aug 24, 2004
  2. Vladimír Kolesnik

    read national characters from the form

    Vladimír Kolesnik, Oct 9, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    713
    Vladimír Kolesnik
    Oct 10, 2004
  3. Peter Hemmingsen

    National characters in response

    Peter Hemmingsen, Dec 2, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    467
    Peter Hemmingsen
    Dec 2, 2004
  4. Replies:
    1
    Views:
    2,015
    Roland de Ruiter
    Jun 15, 2006
  5. Leif B. Kristensen

    Problem with national characters

    Leif B. Kristensen, Mar 31, 2005, in forum: Python
    Replies:
    7
    Views:
    476
    Leif B. Kristensen
    Apr 9, 2005
  6. Ed
    Replies:
    10
    Views:
    51,144
    alok000707
    Jul 13, 2010
  7. Hans
    Replies:
    4
    Views:
    401
    Katarina WONG
    Apr 19, 2005
  8. Stefano Crocco
    Replies:
    0
    Views:
    260
    Stefano Crocco
    Nov 14, 2008
Loading...