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



> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> pple.com]O
> n Behalf Of Helmut Schottmüller
> Sent: Thursday, March 22, 2007 3:04 PM
> To: webobjects-dev Apple
> Subject: Strange UTF-8 problems with DirectAction
> 
> 
> Hi,
> 
> I thought I've solved all my UTF-8 issues with WO but now I am  
> confronted with another strange problem.
> I have a search form which is called by DirectAction. When I enter  
> search text containing UTF-8 characters, the characters are  
> corrupted. But I have done everything in the Application and Session  
> classes I found in the WikiBooks documentation to support UTF-8.
> The funny thing is, that the results of my search are created by an  
> "action" binding. And if I enter my search text again in the page  
> which was created as a dynamic page, everything works fine with  
> UTF-8. So it must have to do something with DirectAction I assume.
> 
> Does someone has a clue? Is there anything I have to enable in the  
> DirectAction class when I want to use UTF-8?
> 
> Regards,
> 
> Helmut
> 
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to