Remove wxWebResponse::AsString() conversion parameter
It doesn't make much sense to specify the conversion here, it would ideally be taken from the response Content-Type header itself and currently is just assumed to be UTF-8 anyhow. Also implement fallback to Latin-1 to avoid losing the data entirely if it's not in UTF-8.
This commit is contained in:
@@ -450,11 +450,9 @@ public:
|
||||
/**
|
||||
Returns all response data as a string.
|
||||
|
||||
@param conv wxMBConv used to convert the response to a string.
|
||||
If @c NULL, the conversion will be determined by
|
||||
response headers. The default is UTF-8.
|
||||
This is mostly useful for debugging or diagnostics.
|
||||
*/
|
||||
wxString AsString(wxMBConv* conv = NULL) const;
|
||||
wxString AsString() const;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user