handle unicode chars in emoticons. fixes #3227

This commit is contained in:
Yann Leboulanger 2007-11-26 12:03:09 +00:00
parent 034999989d
commit 3ee18c20c8
1 changed files with 2 additions and 1 deletions

View File

@ -2329,7 +2329,8 @@ class Interface:
# because emoticons match later (in the string) they need to be after
# basic matches that may occur earlier
emot_and_basic_pattern = basic_pattern + emoticons_pattern
self.emot_and_basic_re = re.compile(emot_and_basic_pattern, re.IGNORECASE)
self.emot_and_basic_re = re.compile(emot_and_basic_pattern,
re.IGNORECASE + re.UNICODE)
# at least one character in 3 parts (before @, after @, after .)
self.sth_at_sth_dot_sth_re = re.compile(r'\S+@\S+\.\S*[^\s)?]')