Hi Matt,
In short:
1. overwrite takeValuesFromRequest in your multipart form component:
public void takeValuesFromRequest(WORequest aRequest, WOContext aContext)
{
aRequest.setDefaultFormValueEncoding( _NSUtilities.UTF8StringEncoding );
super.takeValuesFromRequest(aRequest, aContext);
}
2. overwrite the createRequest method in Application
public WORequest createRequest(String aMethod, String aURL,
String anHTTPVersion, NSDictionary someHeaders, NSData aContent,
NSDictionary someInfo)
{
WORequest newRequest = super.createRequest(aMethod, aURL, anHTTPVersion,
someHeaders, aContent, someInfo);
newRequest.setDefaultFormValueEncoding(_NSUtilities.UTF8StringEncoding);
return newRequest;
}
he also used the following overwrite in Application:
public WOResponse dispatchRequest(WORequest request)
{
WOResponse response = super.dispatchRequest(request);
String contentType = response.headerForKey("content-type");
if ((contentType == null) || (contentType.toLowerCase().indexOf("text/html") > -1))
{
response.setContentEncoding(_NSUtilities.UTF8StringEncoding);
response.setHeader("text/html; charset=UTF-8; encoding=UTF-8", "content-type");
}
return response;
}
This should do it. It works fine in my projects.
For more detailed information, please refer to Chucks original post.