J
J
JRazor2014-06-08 21:09:31
Python
JRazor, 2014-06-08 21:09:31

Parsing to csv: incorrect encoding display?

Hello. Wrote a parser in Scrapy that parses LinkedIn and saves to a CSV file. Everything would be fine, but the encoding is not saved and letters that are not in the Latin alphabet are displayed incorrectly.
I save to a file, pre-writing encode :

place = sel.xpath('//*[@id="headline"]/dd[1]/span/text()').extract()[0].encode('utf-8').strip()

But in the end, the encoding is still incorrect. Can anyone advise something?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question