[issue13333] utf-7 inconsistent with surrogates

2011-11-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: I made a little fix to the patch for wide unicode builds and then committed it. Thank you! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue13333] utf-7 inconsistent with surrogates

2011-11-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset ddfcb0de564f by Antoine Pitrou in branch '3.2': Issue #1: The UTF-7 decoder now accepts lone surrogates http://hg.python.org/cpython/rev/ddfcb0de564f New changeset 250091e60f28 by Antoine Pitrou in branch 'default': Issue #1: The UTF-7 deco

[issue13333] utf-7 inconsistent with surrogates

2011-11-14 Thread Martin v . Löwis
Martin v. Löwis added the comment: LGTM. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue13333] utf-7 inconsistent with surrogates

2011-11-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a non-git diff then :) -- Added file: http://bugs.python.org/file23688/utf7-nogit.patch ___ Python tracker ___

[issue13333] utf-7 inconsistent with surrogates

2011-11-14 Thread Martin v . Löwis
Martin v. Löwis added the comment: Please don't use git-style diffs then, since otherwise the review can't figure out what the patch applies to (and neither could I figure that out). -- ___ Python tracker ___

[issue13333] utf-7 inconsistent with surrogates

2011-11-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: It's a patch for 3.2. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue13333] utf-7 inconsistent with surrogates

2011-11-14 Thread Martin v . Löwis
Martin v. Löwis added the comment: Can you please regenerate the patch against default's head? -- ___ Python tracker ___ ___ Python-b

[issue13333] utf-7 inconsistent with surrogates

2011-11-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch. -- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file23686/utf7.patch ___ Python tracker ___ ___

[issue13333] utf-7 inconsistent with surrogates

2011-11-11 Thread Ezio Melotti
Ezio Melotti added the comment: FWIW Wikipedia says "Other characters must be encoded in UTF-16 (hence U+1 and higher would be encoded into surrogates) and then in modified Base64." So one possible interpretation is that while encoding a non-BMP char, it should be first converted in a sur

[issue13333] utf-7 inconsistent with surrogates

2011-11-03 Thread Martin v . Löwis
Martin v. Löwis added the comment: RFC 2152 talks about encoding 16-bit unicode, and clarifies Surrogate pairs (UTF-16) are converted by treating each half of the pair as a separate 16 bit quantity (i.e., no special treatment). So lone surrogates clearly should be supported. This text cou

[issue13333] utf-7 inconsistent with surrogates

2011-11-03 Thread Petri Lehtinen
Changes by Petri Lehtinen : -- nosy: +petri.lehtinen ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue13333] utf-7 inconsistent with surrogates

2011-11-03 Thread Antoine Pitrou
New submission from Antoine Pitrou : The utf-7 codec happily encodes lone surrogates, but it won't decode them: >>> "\ud801".encode("utf-7") b'+2AE-' >>> "\ud801\ud801".encode("utf-7") b'+2AHYAQ-' >>> "\ud801".encode("utf-7").decode("utf-7") Traceback (most recent call last): File "", line 1,