HTTP Client returning the right decode string

Hi, I use the fetch function to get html page, and found that if the page charset is not UTF8, like some page header has the charset information: <meta http-equiv="Content-Type" content="text/html; charset=gbk" />, this kind of page will be decode in UTF8 default, and will get the wrong content. I check the package source code, and fount the problem is here:

Uno.Net.Http/0.24.5/Implementation/iOS/HttpRequest.mm

line number: 116, 
method: Void Completed(NSData data, NSHTTPURLResponse response, NSError error) 

in this function line number: 130, it use UTF8 decode the response data into string.

I think have better use the method: GetResponseHeader(uString key) to get the charset of the web page, and then use this charset to decode the response data.

Thanks!

Thanks for the tip! I’ve filed an internal ticket pointing to this thread. Our HTTP-guys will have a look :slight_smile: