]> granicus.if.org Git - python/commit
Merged revisions 82413,82468 via svnmerge from
authorEzio Melotti <ezio.melotti@gmail.com>
Sat, 3 Jul 2010 05:18:50 +0000 (05:18 +0000)
committerEzio Melotti <ezio.melotti@gmail.com>
Sat, 3 Jul 2010 05:18:50 +0000 (05:18 +0000)
commit25bc019d4698917083327b9701d66caf8b1db2de
tree865143bc48c825808de90adfed89cf0820a5b08b
parent795b8e3f1317c676d3f263341ead759f5f7e53a4
Merged revisions 82413,82468 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r82413 | ezio.melotti | 2010-07-01 10:32:02 +0300 (Thu, 01 Jul 2010) | 13 lines

  Update PyUnicode_DecodeUTF8 from RFC 2279 to RFC 3629.

  1) #8271: when a byte sequence is invalid, only the start byte and all the
     valid continuation bytes are now replaced by U+FFFD, instead of replacing
     the number of bytes specified by the start byte.
     See http://www.unicode.org/versions/Unicode5.2.0/ch03.pdf (pages 94-95);
  2) 5- and 6-bytes-long UTF-8 sequences are now considered invalid (no changes
     in behavior);
  3) Change the error messages "unexpected code byte" to "invalid start byte"
     and "invalid data" to "invalid continuation byte";
  4) Add an extensive set of tests in test_unicode;
  5) Fix test_codeccallbacks because it was failing after this change.
........
  r82468 | ezio.melotti | 2010-07-03 07:52:19 +0300 (Sat, 03 Jul 2010) | 1 line

  Update comment about surrogates.
........
Lib/test/test_codeccallbacks.py
Lib/test/test_unicode.py
Misc/NEWS
Objects/unicodeobject.c