title: UnicodeEncodeError after setting restrict_xpaths settings
body: <p>i'm new to python and scrapy. After setting restrict_xpaths settings to "//table[@class="lista"]"  I've received following traceback. What's strange, by using other xpath rule the crawler works properly. </p>
  
  <pre><code>Traceback (most recent call last):
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twisted/internet/base.py", line 800, in runUntilCurrent
      call.func(*call.args, **call.kw)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twisted/internet/task.py", line 602, in _tick
      taskObj._oneWorkUnit()
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twisted/internet/task.py", line 479, in _oneWorkUnit
      result = self._iterator.next()
    File "/Library/Python/2.7/site-packages/scrapy/utils/defer.py", line 57, in &lt;genexpr&gt;
      work = (callable(elem, *args, **named) for elem in iterable)
  --- &lt;exception caught here&gt; ---
    File "/Library/Python/2.7/site-packages/scrapy/utils/defer.py", line 96, in iter_errback
      yield it.next()
    File "/Library/Python/2.7/site-packages/scrapy/contrib/spidermiddleware/offsite.py", line 23, in process_spider_output
      for x in result:
    File "/Library/Python/2.7/site-packages/scrapy/contrib/spidermiddleware/referer.py", line 22, in &lt;genexpr&gt;
      return (_set_referer(r) for r in result or ())
    File "/Library/Python/2.7/site-packages/scrapy/contrib/spidermiddleware/urllength.py", line 33, in &lt;genexpr&gt;
      return (r for r in result or () if _filter(r))
    File "/Library/Python/2.7/site-packages/scrapy/contrib/spidermiddleware/depth.py", line 50, in &lt;genexpr&gt;
      return (r for r in result or () if _filter(r))
    File "/Library/Python/2.7/site-packages/scrapy/contrib/spiders/crawl.py", line 73, in _parse_response
      for request_or_item in self._requests_to_follow(response):
    File "/Library/Python/2.7/site-packages/scrapy/contrib/spiders/crawl.py", line 52, in _requests_to_follow
      links = [l for l in rule.link_extractor.extract_links(response) if l not in seen]
    File "/Library/Python/2.7/site-packages/scrapy/contrib/linkextractors/sgml.py", line 124, in extract_links
      ).encode(response.encoding)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings/iso8859_2.py", line 12, in encode
      return codecs.charmap_encode(input,errors,encoding_table)
  exceptions.UnicodeEncodeError: 'charmap' codec can't encode character u'\xbb' in position 686: character maps to &lt;undefined&gt;
  </code></pre>
  
  <p>Here is MySpider Class.</p>
  
  <pre><code>from scrapy.contrib.spiders import CrawlSpider, Rule
  from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
  from scrapy.selector import HtmlXPathSelector
  from ds_crawl.items import DsCrawlItem
  
  class MySpider(CrawlSpider):
      name = 'inside'
      allowed_domains = ['wroclaw.dlastudenta.pl']
      start_urls = ['http://wroclaw.dlastudenta.pl/stancje/']
  
      rules = (
          Rule(SgmlLinkExtractor(allow=('show_stancja'), restrict_xpaths=('//table[@class="lista"]')),  callback='parse_item', follow= True),)
  
      def parse_item(self, response):
          hxs = HtmlXPathSelector(response)
          titles = hxs.select("//p[@class='bbtext intextAd']")
          for titles in titles:
              item = DsCrawlItem()
              item['content'] = titles.select("text()").extract()
              print item
  </code></pre>
  
  <p>Any explanation of this error and help will be appreciated. Thank you.</p>