[Python-bugs-list] [ python-Bugs-599377 ] re searches don't work with 4-byte unico

noreply@sourceforge.net noreply@sourceforge.net
Fri, 23 Aug 2002 12:25:31 -0700


Bugs item #599377, was opened at 2002-08-23 15:16
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=599377&group_id=5470

Category: Python Library
Group: Python 2.2.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Jim Fulton (dcjim)
>Assigned to: Fredrik Lundh (effbot)
Summary: re searches don't work with 4-byte unico

Initial Comment:
For Python 2.2.1 or the CVS head, as of this posting, 
with Python configured for 4-byte unicode
(--enable-unicode=ucs4)
searches against unicode regular expressions that use 
characters above \xff don't seem to work.

Here's an example:

  invalid_xml_char = re.compile(u'[\ud800-\udfff]')
  invalid_xml_char.search(u'\ud800')

returns None, rather than a match.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=599377&group_id=5470