Raffaello Tesi wrote:
CASE 5 I just replace "text = 'Foobar ' + text" with just print text the following error occurs: UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 109: ordinal not in range(128)
Use 'wikipedia.output()' instead of 'print'.
CASE 6 I create a separate file without retrieving anything from wikipedia, but just adding the text as a string (text = """text, accénts, etc."""), and implement ALL the examples above. All of them work, that is, no Unicode errors.
With """...""" you can do a raw input of data.
Regards, Francesco Cosoleto