i am parsing rss feed.But i cantable to parse encoding data from thee rss feed.How to parse encoding data from the rss feed?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s a rough task. feedparser (Python) does a number of things to try to appropriately guess the right character set. There are a few places where it can be provided — such as the header of the XML and the header from the HTTP transaction (which overrides the header of the XML). If it’s not there (or it’s completely invalid which is quite common), it falls back to statistical guessing. There’s one last technique — try converting it as UTF-8 and if that fails, convert it from ISO-8859-1 to UTF-8 and try again. Good luck!