Untested encoding fix

After a second look it appears the setBodyEncoding(...)-method is not exposed throught the interface in use, but I think something like this is worth a try as workaround.