Beispiel #1
0
def test_text_encode_utf16be():
    encoder = TextEncoder()
    encoder.set_encoding(TextEncoder.E_utf16be)

    for c in valid_characters():
        enc = encoder.encode_wtext(c)
        assert enc == c.encode('utf-16-be')
Beispiel #2
0
def test_text_encode_iso8859():
    encoder = TextEncoder()
    encoder.set_encoding(TextEncoder.E_iso8859)

    for i in xrange(255):
        c = unichr(i)
        enc = encoder.encode_wtext(c)
        assert enc == c.encode('latin-1')