Contact search doesn't support Chinese

Bug #1421245 reported by Michael Sheldon
46
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
Critical
Bill Filler
address-book-app (Ubuntu)
Fix Released
Critical
Renato Araujo Oliveira Filho
dialer-app (Ubuntu)
Invalid
High
Unassigned
messaging-app (Ubuntu)
Invalid
High
Unassigned

Bug Description

Steps to reproduce

1) Create a contact with a Chinese name

2) Type that name in to the contact search

Expected result

Just that contact should appear

Actual result

All contacts appear

Tags: bq

Related branches

no longer affects: dialer-app (Ubuntu)
Revision history for this message
Riccardo Padovani (rpadovani) wrote :

As reported in https://lists.ubuntu.com/archives/ubuntu-devel-discuss/2015-April/015449.html there is the same problem with Cyrilic alphabet. Maybe it happens with all characters that aren't in latin alphabet?

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

affects: messaging-app → messaging-app (Ubuntu)
Changed in messaging-app (Ubuntu):
status: New → Confirmed
affects: dialer-app → dialer-app (Ubuntu)
Changed in dialer-app (Ubuntu):
status: New → Confirmed
affects: address-book-app → address-book-app (Ubuntu)
Changed in address-book-app (Ubuntu):
status: New → Confirmed
Changed in address-book-app (Ubuntu):
importance: Undecided → High
Changed in dialer-app (Ubuntu):
importance: Undecided → High
Changed in messaging-app (Ubuntu):
importance: Undecided → High
Revision history for this message
Roman Shchekin (mrqtros) wrote :

Critical issue, I think, also reproducible fro Russian language.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in address-book-app (Ubuntu):
status: New → Confirmed
Changed in dialer-app (Ubuntu):
status: New → Confirmed
Changed in messaging-app (Ubuntu):
status: New → Confirmed
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

Some name examples to test:

Роман Щекин
Дмитрий Ященко
Фёдор Емельяненко
Владимир Путин

Changed in address-book-app (Ubuntu):
assignee: nobody → Renato Araujo Oliveira Filho (renatofilho)
tags: added: bq
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

@renato per mailing list:

https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/wily/address-book-app/wily/view/head:/src/imports/Ubuntu/Contacts/ContactListModel.qml

The looks a bit suspicious:

    var containsLetter = /^[a-zA-Z]/.test(value)

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

I suspect the rest of the onValueChanged handler is mistaken too:

                if (containsLetter && (filters.length > 1)) {
                    filters = [filters[0]]
                } else if (!containsLetter) {
                    filters = [filters[0], phoneNumberFilter]
                }

If I understand it correctly, that's assuming a token that doesn't contain a letter must be part of a phone number, which isn't true. For example, in London, The Bar With No Name is also known as 69 Colebrooke Row because that is its address. But if I add a contact with that name and address, and then search for "69", I get no results, presumably because the address book is looking for "69" only in the phone number and not finding it.

If it is legitimate to be using a containsLetter here, though, I think it needs to be a function that calls isLetter() on each character of the string, stopping and returning true if any of those calls return true. isLetter() does the right thing by checking whether the character is in *any* of the Unicode Letter- categories, not just [a-zA-Z]. <http://doc.qt.io/qt-5/qchar.html#isLetter> Unfortunately there doesn't seem to be any equivalent element for this in QRegExp.

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

Marking critical for china launch

Changed in canonical-devices-system-image:
assignee: nobody → Bill Filler (bfiller)
importance: Undecided → Critical
milestone: none → ww28-2015
status: New → Confirmed
Bill Filler (bfiller)
Changed in address-book-app (Ubuntu):
importance: High → Critical
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package address-book-app - 0.2+15.10.20150629-0ubuntu1

---------------
address-book-app (0.2+15.10.20150629-0ubuntu1) wily; urgency=medium

  [ CI Train Bot ]
  * Resync trunk.

  [ Renato Araujo Oliveira Filho ]
  * Fixed search by non-latin names. (LP: #1421245)

 -- CI Train Bot <email address hidden> Mon, 29 Jun 2015 18:09:22 +0000

Changed in address-book-app (Ubuntu):
status: Confirmed → Fix Released
Changed in canonical-devices-system-image:
status: Confirmed → Fix Released
Changed in dialer-app (Ubuntu):
status: Confirmed → Invalid
Changed in messaging-app (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Ethan Chang (ethan.chang) wrote :

I also test contact search with Simplified Chinese, it works for me.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.