• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to encode non-ASCII characters in the Content-Disposition
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to encode non-ASCII characters in the Content-Disposition


  • Subject: How to encode non-ASCII characters in the Content-Disposition
  • From: Miguel Arroz <email@hidden>
  • Date: Fri, 6 Mar 2009 23:49:19 +0000

Hi!

I have an element that I use to download files, that sets the filename in the Content-Disposition header like this:

response.setHeader("attachment; filename=\"" + fileData.name().replace("\"", "\\\"") + "\"", "Content-Disposition");

Although this works for ASCII characters, it's corrupting filenames with non-ASCII chars, like arabic, chinese, etc. I'm trying to understand how to make this work, but the more I dig trough RFCs the more pissed off I get. Does anyone have already solved this issue and is kind enough to copy/paste the code snippet? :)

  Yours

Miguel Arroz
...........................
http://www.survs.com

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Jad?
  • Next by Date: Re: Memory Management
  • Previous by thread: Re: Jad?
  • Next by thread: Digging up a Session object from an EOGenericRecord
  • Index(es):
    • Date
    • Thread