title: How to solve problem with parsing html file with cyrillic symbol?
body: <p>I have some html file with span elements:</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;span class="one"&gt;Text&lt;/span&gt;some text&lt;/br&gt;
  &lt;span class="two"&gt;Привет&lt;/span&gt;Текст на русском&lt;/br&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>To get "some text" :</p>
  
  <pre><code># -*- coding:cp1251 -*-
  import lxml
  from lxml import html
  
  filename = "t.html"
  fread = open(filename, 'r')
  source = fread.read()
  
  tree = html.fromstring(source)
  fread.close()
  
  
  tags = tree.xpath('//span[@class="one" and text()="Text"]') #This OK
  print "name: ",tags[0].text
  print "value: ",tags[0].tail
  
  tags = tree.xpath('//span[@class="two" and text()="Привет"]') #This False
  
  print "name: ",tags[0].text
  print "value: ",tags[0].tail
  </code></pre>
  
  <p>This show:</p>
  
  <pre><code>name: Text
  value: some text
  
  Traceback: ... in line `tags = tree.xpath('//span[@class="two" and text()="Привет"]')`
      ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes
  </code></pre>
  
  <p>How to solve this problem?</p>