Merlijn van Deen wrote:
Use u'string' when talking about strings (i.e. character data, without attached encoding); use 'string' when talking about a *bytestring*, i.e. encoded data (where the so called string is just a representation of an array of ints)
Yes, that solves the problem mentioned in case 2. However, the UnicodeDecodeError still occurs in other cases, e.g.
lines = str(text).split('\n')
where text = page.get()
Cheers, Raffaello