4

Whenever I use Contacts.app to fill out a form on a website, I have a problem with any phone number field.

Contacts.app adds unicode "left-to-right override" (U+202D codepoint: E2 80 AD in UTF-8 contexts, 20 2D in UTF-16 contexts) before the first digit, and "pop directional formatting" (U+202C codepoint: E2 80 AC in UTF-8 contexts, 20 2C in UTF-16 contexts) after the last digit. Many websites get upset by this, because those are not recognised as valid phone number digits. As they are zero-width symbols, the first few times I saw this problem I didn't even understand what was going wrong.

Note that this still happens if I turn off JavaScript or use a desktop text editor like TextWrangler (TextWrangler is how I originally found out which zero-width symbols were being inserted); as it happens, I only care about websites because websites are the only thing which validates that phone numbers match a pattern such as the regex [0-9()+\s]*

This happens with all phone numbers in Contacts, regardless of whose (some are formatted as UK, some as USA, some as German).

Method: open Contacts.app, select any person, double (or triple) click on a phone number to select all of it, ⌘C-⌘V to copy-paste; if I paste into an app which shows non-printable characters like TextWrangler then I can see their existence, if I paste into a web browser it's present but zero-width, as arrow keys 'stick' at those positions and the delete key does in fact remove them.

It happens as described in both Safari and Chrome. In Firefox, it behaved slightly differently, and seemed to automatically delete the extra characters as soon as I pass through them with my arrow keys (?!).

How do I stop Contacts.app from adding these unicode symbols?

  • 1
    can we have a screen shot, you know picture speaks 1000 words – Ruskes Sep 20 '18 at 23:54
  • also which browser are you using – Ruskes Sep 21 '18 at 0:10
  • 1
    @Buscar웃 screens it's won't show zero width characters and so I can't see how that would help – Mark Sep 22 '18 at 9:46
  • @Mark you can show them chrome.google.com/webstore/detail/replace-zero-width-charac/… – Ruskes Sep 22 '18 at 15:19
  • 1
    I too am having this problem. I did not have it with my US number, but when I moved and got a Swedish number, Apple Contacts did this. I have tried everything to remove it. Deleting my card, recreating it. Deleting the number and re-adding it by typing. I cannot get rid of these invisible characters in my phone number in Apple Contacts. – JeremiahLee Jan 14 at 13:22
1

This isn't an answer but I wanted to add a screenshot as some people have requested it.

I noticed this bug today as well (macOS 10.14.3) and was glad to find this already reported, and surprised it hasn't received more attention.

I filed bugs #47763641 & #5235503 with Apple, hopefully they will notice. I encourage others to report it.

Here are steps to repro & a screenshot that shows the issue:

  1. From Contacts.app, right-click → Copy on a phone number.
  2. Paste into Sublime Text or any other plaintext editor.
  3. Save as test.txt
  4. Open in a Hex Editor, I used Hex Fiend in this example
  5. You can now see the extra bytes (I highlighted them below)

zwsp-chars-screenshot

edit: wanted to add a couple of bits of information.

  1. This seems to only affect phone# fields. Others such as email, addresses, notes etc don't exhibit this bug.
  2. If, instead of using ⌘A (select-all), you very carefully select just from the start of the phone# to the end and then copy, the unwanted zwsp characters aren't copied.

My workaround for now is an Alfred workflow that I mapped to ⌘⇧C that copies the selected field and trims the whitespace. Not exactly elegant, but it works well enough until Apple fixes this.

-3

Contacts.app does not do that.

It is the website(s) you are visiting and filling out the forms.

They are the one adding the hidden character.

Article:

Make them visible in Chrome

Why ??

Zero-width characters can be used for fingerprinting !

  • It's not just websites, this also shows up in text editors apps (e.g. TextWrangler). It's just not important when it shows up in text editors, because text editors don't throw a fit over it. – BenRW Sep 22 '18 at 20:20
  • 1
    Also, here's some extra information: it still happens on websites even if I disable JavaScript, which would prevent any website from editing the text in an element.onpaste handler that added specific invisible characters that they (for some) reason decided to not accept. – BenRW Sep 22 '18 at 20:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .