Merlijn van Deen wrote:
str(abc) tries to make a bytestring of the text object. either use
text.split('\n')
Yes, that made the trick!
And for the regexp case: use ur'text' (or ru'text', I think it was ur'') instead of r''
Well, it didn't complain before with just r'text', while if I put ur'text' I get UnicodeDecodeError: 'utf8' codec can't decode byte 0xe8 in position 0: unexpected end of data while with ru'text' just a SyntaxError
I'm still getting trouble for this string interpolation incipit = textForm % fields with the same UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 14: ordinal not in range(128)
Sorry to bother with this unicode stuff, but I'm really struggling and finding poor references on the net (if you have references, please share, so I might try to find out something by myself :)
Cheers, Raffaello