[Solved] UnicodeDecodeError: 'utf-8' codec can't decode byte

Summary.

## Expected Result

  File "/home/xxx/website/connection.py", line 38, in requests
    response = requests.get(link, params=params, **kwargs)
  File "/home/xxx/venv/lib/python3.5/site-packages/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "/home/xxx/venv/lib/python3.5/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/xxx/venv/lib/python3.5/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/xxx/venv/lib/python3.5/site-packages/requests/sessions.py", line 668, in send
    history = [resp for resp in gen] if allow_redirects else []
  File "/home/xxx/venv/lib/python3.5/site-packages/requests/sessions.py", line 668, in <listcomp>
    history = [resp for resp in gen] if allow_redirects else []
  File "/home/xxx/venv/lib/python3.5/site-packages/requests/sessions.py", line 149, in resolve_redirects
    url = self.get_redirect_target(resp)
  File "/home/xxx/venv/lib/python3.5/site-packages/requests/sessions.py", line 115, in get_redirect_target
    return to_native_string(location, 'utf8')
  File "/home/xxx/venv/lib/python3.5/site-packages/requests/_internal_utils.py", line 25, in to_native_string
    out = string.decode(encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd9 in position 71: invalid continuation byte

## Actual Result

What happened instead.

## Reproduction Steps

```python
import requests
response = requests.get("https://www.shahbapress.com/news/8443/")
response.encoding = 'utf-8'
```

## System Information

    $ python -m requests.help

{
  "chardet": {
    "version": "3.0.4"
  },
  "cryptography": {
    "version": ""
  },
  "idna": {
    "version": "2.8"
  },
  "implementation": {
    "name": "CPython",
    "version": "3.5.6"
  },
  "platform": {
    "release": "4.15.0-29deepin-generic",
    "system": "Linux"
  },
  "pyOpenSSL": {
    "openssl_version": "",
    "version": null
  },
  "requests": {
    "version": "2.21.0"
  },
  "system_ssl": {
    "version": "1010008f"
  },
  "urllib3": {
    "version": "1.24.1"
  },
  "using_pyopenssl": false
}

```
python 3.5.6

```
to fix error in file _internal_utils.py line number 25
replace this line:
```
out = string.decode(encoding)
```
to line:
```
out = string.decode(encoding, 'ignore')
```

thank you

Hi, @AboTyim   I'm closing this issue since you marked it as Solved.

It still happens with other urls

    response = requests.get("https://www.carm.es/web/pagina?IDCONTENIDO=701&IDTIPO=100&RASTRO=c286$m")


> It still happens with other urls
> 
> ```
> response = requests.get("https://www.carm.es/web/pagina?IDCONTENIDO=701&IDTIPO=100&RASTRO=c286$m")
> ```

You can manually edit the file "_internal_utils.py" as shown above

In my case the part casing the error is /8443 in the url ( https://www.shahbapress.com/news/8443/ )
I remade the url like this
https://www.shahbapress.com/news\/8443/  (back-slash used before the slash having numbers next)