diff --git a/tests/test_linkextractors.py b/tests/test_linkextractors.py
index 3ad1abea5..1ea364d80 100644
--- a/tests/test_linkextractors.py
+++ b/tests/test_linkextractors.py
@@ -818,11 +818,11 @@ class LxmlLinkExtractorTestCase(Base.LinkExtractorTestCase):
def test_skip_bad_links(self):
html = b"""
- Why would you do this?
+ Why would you do this?
Good Link
Good Link 2
"""
- response = HtmlResponse("http://example.org/index.html", body=html)
+ response = HtmlResponse("http://example.org/index.html", body=html, encoding='utf-8')
lx = self.extractor_cls()
self.assertEqual(
[link for link in lx.extract_links(response)],