Untested encoding fix

After a second look it appears the setBodyEncoding(...)-method is no accessible, but I think something like this is worth a try. I haven