Natim,
I'm still getting errors. Here's what shows up:
FAIL: testDontConvertSmartQuotesWhenAlsoConvertingEntities (__main__.EncodeRed)
----------------------------------------------------------------------
Traceback (most recent call last):
File "BeautifulSoupTests.py", line 839, in
testDontConvertSmartQuotesWhenAlsoConvertingEntities
'Il a dit, ‹Sacré bleu!›')
AssertionError: 'Il a dit, Sacré bleu!' != 'Il a dit,
‹Sacré bleu!›'
=======================================
FAIL: testRewrittenMetaTag (__main__.EncodeRed)
----------------------------------------------------------------------
Traceback (most recent call last):
File "BeautifulSoupTests.py", line 823, in testRewrittenMetaTag
isolatin.replace("ISO-Latin-1", "utf-8").replace("\xe9", "\xc3\xa9"))
File "BeautifulSoupTests.py", line 18, in assertSoupEquals
self.assertEqual(str(c(toParse)), rep)
AssertionError: '<html><meta http-equiv="Content-type"
content="text/html; charset=utf-8" />Sacrleu!</html>' != '<html><meta
http-equiv="Content-type" content="text/html; charset=utf-8"
/>Sacr\xc3\xa9 bleu!</html>'
======================================================================
FAIL: testRewrittenXMLHeader (__main__.EncodeRed)
----------------------------------------------------------------------
Traceback (most recent call last):
File "BeautifulSoupTests.py", line 761, in testRewrittenXMLHeader
self.assertSoupEquals(old_text, new_text)
File "BeautifulSoupTests.py", line 18, in assertSoupEquals
self.assertEqual(str(c(toParse)), rep)
AssertionError: "<?xml version='1.0' encoding='utf-8'?><foo></foo>" !=
"<?xml version='1.0' encoding='utf-8'?><foo>’</foo>"
========================================
FAIL: testSmartQuotesNotSoSmartAnymore (__main__.EncodeRed)
----------------------------------------------------------------------
Traceback (most recent call last):
File "BeautifulSoupTests.py", line 833, in testSmartQuotesNotSoSmartAnymore
'‘Foo’ <!--blah-->')
File "BeautifulSoupTests.py", line 18, in assertSoupEquals
self.assertEqual(str(c(toParse)), rep)
AssertionError: 'Foo <!--blah-->' != '‘Foo’ <!--blah-->'
==========================================
FAIL: testUnicodeDammitStandalone (__main__.EncodeRed)
----------------------------------------------------------------------
Traceback (most recent call last):
File "BeautifulSoupTests.py", line 707, in testUnicodeDammitStandalone
self.assertEquals(dammit.unicode, "<foo>’</foo>")
AssertionError: u'<foo></foo>' != '<foo>’</foo>'
======================================
FAIL: testFindAllText (__main__.FollowThatTag)
----------------------------------------------------------------------
Traceback (most recent call last):
File "BeautifulSoupTests.py", line 82, in testFindAllText
[u'\xbb'])
AssertionError: [] != [u'\xbb']