Hey everyone,
For the moment, I opted to use string replacement as my "solution."

So for the below string containing the HTML decimal represenation for en dash:

>>>x = "The event takes place June 17 – 19"
>>>x.replace('–', '-')
'The event takes place June 17 - 19'

It works in my case since this seems to be the only code that
Universal Feed Parser didn't properly translate, but of course not an
ideal solution. I assume this path will require me to build a
character reference dictionary as I encounter more character codes.

I also tried wrestling with character conversion:

>>>unichr(150)
u'\x96'

Not sure where to go from there...
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to