Change decode() so that it works with a buffer (i.e. unicode(..., 'utf-8-sig'))

SF bug #1601501.
This commit is contained in:
Walter Dörwald 2006-11-23 05:03:56 +00:00
parent 4ebbefe677
commit 39b8b6afb5
2 changed files with 5 additions and 1 deletions

View file

@ -425,6 +425,10 @@ class UTF8SigTest(ReadTest):
]
)
def test_bug1601501(self):
# SF bug #1601501: check that the codec works with a buffer
unicode("\xef\xbb\xbf", "utf-8-sig")
class EscapeDecodeTest(unittest.TestCase):
def test_empty(self):
self.assertEquals(codecs.escape_decode(""), ("", 0))