wrap in charset
This commit is contained in:
parent
b40fe94147
commit
80402943a1
1 changed files with 6 additions and 1 deletions
|
|
@ -36,7 +36,12 @@ func DiscoverFeed(candidateUrl string) (*DiscoverResult, error) {
|
|||
if res.StatusCode != 200 {
|
||||
return nil, fmt.Errorf("status code %d", res.StatusCode)
|
||||
}
|
||||
content, err := ioutil.ReadAll(res.Body)
|
||||
|
||||
body, err := charset.NewReader(res.Body, res.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
content, err := ioutil.ReadAll(body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue