[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    [Bug 143364] Lack of unicode normalisation in search
From:       "Médéric" Boquien <mboquien () free ! fr>
Date:       2008-07-18 0:07:25
Message-ID: 20080718000725.8854.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=143364         
mboquien free fr changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|kwrite                      |part
            Version|unspecified                 |CVS



------- Additional Comments From mboquien free fr  2008-07-18 02:07 -------
Hello.

Apparently the problem is in katetextline.cpp. Indeed in the KateTextLine::searchText \
method, the text and the search strings are compared without normalising them first. \
In this case if the 2 strings are canonically equivalent but with a different \
normalisation (NFC vs NFD for instance) then they won't match. The first step to \
solve the bug would be to substitude m_text by \
m_text.normalized(QString::NormalizationForm_C) and text by \
text.normalized(QString::NormalizationForm_C) for instance so they have the same \
normalisation. However, this fix is apparently not enough. I think the problem comes \
with the index which is not the same depending on the normalisation. One possibility \
would be perhaps to compare the length of the search string before and after the \
normalisation and adapt the index accordingly afterwards. 

Thanks.
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic