I wrote a simple html parsing class in python and it seems to work fine and then I try to use it with django and I get this error:
'ascii' codec can't decode byte 0xc2 in position 54465: ordinal not in range(128)
which is strange because I added this: # encoding: utf-8 to the top of my class. I don’t really know much about encoding but can someone perhaps give me an idea of what’s going here? Btw, I also insured that the source html was already in utf-8. Thanks!
okay, I got it. All I needed to do was include
# -*- coding: utf-8 -*-in the django view as well and that solved it!