RE: Strange UTF-8 problems with DirectAction
RE: Strange UTF-8 problems with DirectAction
- Subject: RE: Strange UTF-8 problems with DirectAction
- From: "Ruenagel, Frank" <email@hidden>
- Date: Thu, 22 Mar 2007 16:26:42 +0100
- Thread-topic: Strange UTF-8 problems with DirectAction
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: webobjects-dev-bounces+webobjects=email@hidden
> [mailto:webobjects-dev-bounces+webobjects=symposion.de@lists.a
> 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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden