ox-it / dataox

The frontend for data.ox.ac.uk
http://data.ox.ac.uk/
12 stars 1 forks source link

Encode to UTF 8 to match feed #14

Closed sp-oxford closed 5 years ago

sp-oxford commented 5 years ago

test to correctly encode £ and ’

from lxml import etree b = '£’' p =etree.HTMLParser(encoding='utf-8') h = etree.fromstring(b , p) etree.tostring(h).decode()