Name: Anonymous 2009-03-29 9:19
Hey /prog/rammers, I need some help. I'm using Python 2.5.2 in conjunction with mechanize and html5lib (BeautifulSoup parser). I'm trying to parse some page from 4chan which often include strange characters (take a look at the attached file). My Python interpreter now always throws up with e.g:
"UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-5: ordinal not in range(128)"
This only happens if the characters are really special: German umlauts (ä,ö,ü) work without problems, furthermore html5lib should automatically convert the given HTML source to unicode.
Do you've got any ideas?
"UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-5: ordinal not in range(128)"
This only happens if the characters are really special: German umlauts (ä,ö,ü) work without problems, furthermore html5lib should automatically convert the given HTML source to unicode.
Do you've got any ideas?