I\'m trying to pass big strings of random html through regular expressions and my Python 2.6 script is choking on this:
UnicodeEncodeError: \'ascii\' codec can\'t e
Total repetition of your other question here (though here you finally deign to show us CODE from the start, wow!-). Answer is still identical: instead of
ofile.write(Test + '\n')
do
ofile.write(Test.encode('utf8') + '\n')
why do you keep repeating this Q, BTW?!