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:
Vadim Zeitlin
2020-12-13 01:11:47 +01:00
parent fd040b702d
commit 1c61fe6baf
3 changed files with 6 additions and 11 deletions

View File

@@ -152,7 +152,7 @@ public:
virtual wxString GetSuggestedFileName() const;
wxString AsString(wxMBConv* conv = NULL) const;
wxString AsString() const;
bool Init();