#1477: ur'\U0010FFFF' raised in narrow unicode builds. · Jacksonrpi/python@2c46175 · GitHub
Skip to content

Commit 2c46175

Browse files
author
amaury.forgeotdarc
committed
#1477: ur'\U0010FFFF' raised in narrow unicode builds.
Corrected the raw-unicode-escape codec to use UTF-16 surrogates in this case, just like the unicode-escape codec. git-svn-id: http://svn.python.org/projects/python/trunk@61793 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent a3d1fc7 commit 2c46175

3 files changed

Lines changed: 63 additions & 6 deletions

File tree

Lib/test/test_unicode.py

Lines changed: 15 additions & 2 deletions

Misc/NEWS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ What's New in Python 2.6 alpha 2?
1212
Core and builtins
1313
-----------------
1414

15+
- Issue #1477: With narrow Unicode builds, the unicode escape sequence
16+
\Uxxxxxxxx did not accept values outside the Basic Multilingual Plane. This
17+
affected raw unicode literals and the 'raw-unicode-escape' codec. Now
18+
UTF-16 surrogates are generated in this case, like normal unicode literals
19+
and the 'unicode-escape' codec.
20+
1521
- Issue #2348: add Py3k warning for file.softspace.
1622

1723
- Issue #2346/#2347: add Py3k warnings for __methods__ and __members__.

Objects/unicodeobject.c

Lines changed: 42 additions & 4 deletions

0 commit comments

Comments
 (0)