HttpClient: correctly set encoding for ptree post requests