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. Advertising

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. [MSFT]Allen
    Replies:
    0
    Views:
    411
    [MSFT]Allen
    Aug 7, 2003
  2. Vladimír Kolesnik

    read national characters from the form

    Vladimír Kolesnik, Oct 9, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    637
    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:
    371
    Peter Hemmingsen
    Dec 2, 2004
  4. Leif B. Kristensen

    Problem with national characters

    Leif B. Kristensen, Mar 31, 2005, in forum: Python
    Replies:
    7
    Views:
    319
    Leif B. Kristensen
    Apr 9, 2005
  5. Hans
    Replies:
    4
    Views:
    260
    Katarina WONG
    Apr 19, 2005
Loading...

Share This Page