]> granicus.if.org Git - python/commit
Fix to the UTF-8 encoder: it failed on 0-length input strings.
authorMarc-André Lemburg <mal@egenix.com>
Thu, 7 Feb 2002 11:33:49 +0000 (11:33 +0000)
committerMarc-André Lemburg <mal@egenix.com>
Thu, 7 Feb 2002 11:33:49 +0000 (11:33 +0000)
commitbd3be8f0ca4fd70d53d9330489ba565f83530b3b
tree33762ec816df0a313706c6a919fbe3629751b0b5
parent9273ec726c1ae9f151d12bc21a1ad96e7c225b77
Fix to the UTF-8 encoder: it failed on 0-length input strings.

Fix for the UTF-8 decoder: it will now accept isolated surrogates
(previously it raised an exception which causes round-trips to
fail).

Added new tests for UTF-8 round-trip safety (we rely on UTF-8 for
marshalling Unicode objects, so we better make sure it works for
all Unicode code points, including isolated surrogates).

Bumped the PYC magic in a non-standard way -- please review. This
was needed because the old PYC format used illegal UTF-8 sequences
for isolated high surrogates which now raise an exception.
Lib/test/output/test_unicodedata
Lib/test/test_unicode.py
Objects/unicodeobject.c
Python/import.c