fix encoding error when getting data from request body, fix encoding of text in log