Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

UnicodeEncodeError

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?

Name: Anonymous 2009-03-29 16:37

I never understood why the class was called "BeautifulSoup." Seems like a pretty non-descriptive of Campbells to me.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List