Projet

Général

Profil

0001-sql-limit-FTS-preprocessing-to-NFKD-normalization-45.patch

Frédéric Péters, 20 juillet 2020 14:49

Télécharger (1014 octets)

Voir les différences:

Subject: [PATCH] sql: limit FTS preprocessing to NFKD normalization (#45285)

 wcs/sql.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
wcs/sql.py
21 21
import datetime
22 22
import time
23 23
import re
24
import unicodedata
24 25
try:
25 26
    import cPickle as pickle
26 27
except ImportError:
......
1659 1660
                            WHERE id = %%(id)s''' % self._table_name
1660 1661
        cur.execute(sql_statement, {
1661 1662
            'id': self.id,
1662
            'fts': qommon.misc.simplify(' '.join(fts_strings), space=' ')})
1663
            'fts': unicodedata.normalize('NFKD', ' '.join(fts_strings)),
1664
        })
1663 1665

  
1664 1666
        conn.commit()
1665 1667
        cur.close()
1666
-