[Tutor] converting encoded symbols from rss feed?
Serdar Tumgoren
zstumgoren at gmail.com
Wed Jun 17 14:30:42 CEST 2009
Hi everyone,
I just tried my hand at parsing an RSS 2.0 feed using Universal Feed
Parser and it worked beautifully. My one point of confusion -- I'm
not sure how to convert encoded characters back to their
human-readable ascii/unicode.
Not sure if it matters, but the feed I'm dealing with is using xml
version 1.0 and "windows-1252" encoding.
Here are some examples of the encoded characters I'm trying to convert:
– (symbol as it appears in the original xml file)
– (symbol as it appears in ipython shell after
using Universal Feed Parser)
What I'd like to do is process all of these xml items, convert the
encoded characters to readable text, and then pop the items in a
database.
So to my question -- can anyone point me to documentation on how to
perform this conversion? I didn't find anything explicit in the
Universal Feed Parser docs, but I figured Python might have a library
that handles this kind of thing.
Any help is greatly appreciated.
Regards,
Serdar
More information about the Tutor
mailing list