summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-04-11 15:39:02 (GMT)
committerGuido van Rossum <guido@python.org>2000-04-11 15:39:02 (GMT)
commitdc742b318480617cdb84af400c4d9dccae3a33d5 (patch)
tree3b5ab2aa0364b9a75edbcb07a68ea1b8ca2fcab8 /Objects
parent86662914be20e1f008132647a82cdeb9506f13c5 (diff)
downloadcpython-dc742b318480617cdb84af400c4d9dccae3a33d5.zip
cpython-dc742b318480617cdb84af400c4d9dccae3a33d5.tar.gz
cpython-dc742b318480617cdb84af400c4d9dccae3a33d5.tar.bz2
Marc-Andre Lemburg:
Added a few missing whitespace Unicode char mappings. Thanks to Brian Hooper.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodectype.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Objects/unicodectype.c b/Objects/unicodectype.c
index 946be22..da2b8d5b 100644
--- a/Objects/unicodectype.c
+++ b/Objects/unicodectype.c
@@ -633,8 +633,8 @@ int _PyUnicode_IsNumeric(register const Py_UNICODE ch)
#ifndef WANT_WCTYPE_FUNCTIONS
-/* Returns 1 for Unicode characters having the type 'WS', 'B' or 'S',
- 0 otherwise. */
+/* Returns 1 for Unicode characters having the bidirectional type
+ 'WS', 'B' or 'S' or the category 'Zs', 0 otherwise. */
int _PyUnicode_IsWhitespace(register const Py_UNICODE ch)
{
@@ -649,6 +649,8 @@ int _PyUnicode_IsWhitespace(register const Py_UNICODE ch)
case 0x001E: /* RECORD SEPARATOR */
case 0x001F: /* UNIT SEPARATOR */
case 0x0020: /* SPACE */
+ case 0x0085: /* NEXT LINE */
+ case 0x00A0: /* NO-BREAK SPACE */
case 0x1680: /* OGHAM SPACE MARK */
case 0x2000: /* EN QUAD */
case 0x2001: /* EM QUAD */
@@ -661,7 +663,9 @@ int _PyUnicode_IsWhitespace(register const Py_UNICODE ch)
case 0x2008: /* PUNCTUATION SPACE */
case 0x2009: /* THIN SPACE */
case 0x200A: /* HAIR SPACE */
+ case 0x200B: /* ZERO WIDTH SPACE */
case 0x2028: /* LINE SEPARATOR */
+ case 0x2029: /* PARAGRAPH SEPARATOR */
case 0x202F: /* NARROW NO-BREAK SPACE */
case 0x3000: /* IDEOGRAPHIC SPACE */
return 1;