I couldn't answer that unfortunately; I usually just use the default
character encoding and it works for me. I suppose you could try alternate
encodings (UTF-8 is always a good place to start).

        --- Pat

> -----Original Message-----
> From: Martin Strand [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 29, 2005 10:16 AM
> To: Tapestry users
> Subject: Re: Encode filename in http header
> 
> The URLEncoder seems to make the filename look even messier. Should I use
> a specific character encoding?
> 
> --Martin
> 
> On Tue, 29 Nov 2005 18:13:44 +0100, Patrick Casey <[EMAIL PROTECTED]>
> wrote:
> 
> >     Did you try:
> >
> >     String foo = ("Content-disposition", "attachment; filename=\""
> >> + filename + "\"";
> >
> >     String bar = java.net.URLEncoder.encode(foo);
> >     Reponse.setHeader(bar);
> >
> >     --- Pat
> >
> >> -----Original Message-----
> >> From: Martin Strand [mailto:[EMAIL PROTECTED]
> >> Sent: Tuesday, November 29, 2005 8:37 AM
> >> To: tapestry-user@jakarta.apache.org
> >> Subject: Encode filename in http header
> >>
> >> I've written a download service where I set the filename like this:
> >>
> >> response.setHeader("Content-disposition", "attachment; filename=\""
> >> + filename + "\"");
> >>
> >> It appears I have to encode non-ascii characters somehow, how do I do
> >> that?
> >>
> >> --Martin
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to