Comment to 'Text pasted from Apple Mac and iPhone don't shoe and can't be edited'
  • On a similar note, I recently discovered that invisible, zero width characters were inserted by Apple. I was attempting to paste a phone number into an Amazon form - it was not accepted. I found this:

    Zero-width characters embedded in phone number whenever they are copied from the macOS address book
    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)....