Re: Strange UTF-8 problems with DirectAction
Re: Strange UTF-8 problems with DirectAction
- Subject: Re: Strange UTF-8 problems with DirectAction
- From: Helmut Schottmüller <email@hidden>
- Date: Thu, 22 Mar 2007 16:35:45 +0100
Hi Frank,
my hero!
Thanks for this hint. It works fine!
Best regards,
Helmut
Am 22.03.2007 um 16:26 schrieb Ruenagel, Frank:
Hi,
we achieve this by overwriting performActionNamed() in
DirectAction (or subclasses).
If you do streaming of binary files (like word or excel) via DAs, the
http-headers should be set appropriately.
Example without try-catch-stuff:
public WOActionResults performActionNamed(String anActionName){
WOActionResults myresult = (WOActionResults) this.valueForKey
(anActionName + "Action" );
WOResponse aResponse = myresult.generateResponse();
//String myType = aResponse.headerForKey("content-type" );
//if (myType != null && myType.indexOf("word" ) == -1)
//{
aResponse.setHeader( "UTF-8", "Content-Encoding");
aResponse.setHeader("text/html; charset=UTF-8", "content-type");
//}
return aResponse;
}
HTH
Frank
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