choose character encoding of response

In my case the response was not encoded correctly. So I added the possibility to chose the desired encoding.