Comment # 8 on bug 59571 from
6th problem: locale changes must lead to re-evaluating cached values in the DB

1. Run evolution-addressbook-factory with LC_ALL=de_DE.utf-8.
2. Import the following contact:

cat >test.vcf <<EOF
BEGIN:VCARD
VERSION:3.0
N:Zoo;Abraham
TEL:1234
FN:Abraham Zoo
END:VCARD
EOF
syncevolution --import test.vcf backend=evolution-contacts

3. Export it:

syncevolution --export - backend=evolution-contacts

BEGIN:VCARD
VERSION:3.0
UID:pas-id-512735B900000000
X-EVOLUTION-FILE-AS:Zoo\, Abraham
N:Zoo;Abraham
TEL;X-EVOLUTION-E164=1234:1234
FN:Abraham Zoo
REV:2013-02-22T09:09:13Z(1)
END:VCARD

4. Run evolution-addressbook-factory with LC_ALL=en_US.utf-8

5. Export the previously imported contact:

syncevolution --export - backend=evolution-contacts

BEGIN:VCARD
VERSION:3.0
UID:pas-id-512735B900000000
X-EVOLUTION-FILE-AS:Zoo\, Abraham
N:Zoo;Abraham
TEL;X-EVOLUTION-E164=1234:1234
FN:Abraham Zoo
REV:2013-02-22T09:09:13Z(1)
END:VCARD

Same as before.

6. Import again, with a different name:

cat >test2.vcf <<EOF
BEGIN:VCARD
VERSION:3.0
N:Zoo2;Abraham
TEL:1234
FN:Abraham Zoo2
END:VCARD
EOF
syncevolution --import test2.vcf backend=evolution-contacts

7. Export both and compare:

syncevolution --export - backend=evolution-contacts

BEGIN:VCARD
VERSION:3.0
UID:pas-id-512735B900000000
X-EVOLUTION-FILE-AS:Zoo\, Abraham
N:Zoo;Abraham
TEL;X-EVOLUTION-E164=1234:1234
FN:Abraham Zoo
REV:2013-02-22T09:09:13Z(1)
END:VCARD

BEGIN:VCARD
VERSION:3.0
UID:pas-id-5127360800000000
X-EVOLUTION-FILE-AS:Zoo2\, Abraham
N:Zoo2;Abraham
TEL;X-EVOLUTION-E164=234:1234
FN:Abraham Zoo2
REV:2013-02-22T09:10:32Z(1)
END:VCARD


Note that the libphonenumber interprets 1234 differently, depending on the
current locale. If in the US, the 1 must get interpreted as some kind of
dialing prefix, leading to a different national number. That means when
switching to or from the US (or switching locales in general), all numbers must
be re-parsed to ensure that the cached values are still correct.

This is not happening, as can be seen in the output above. The two contacts
should always have the same E164 parameter.


You are receiving this mail because: