diff --git a/android/src/com/google/zxing/client/android/encode/MECARDContactEncoder.java b/android/src/com/google/zxing/client/android/encode/MECARDContactEncoder.java index f41d854a3..c7b810e9e 100644 --- a/android/src/com/google/zxing/client/android/encode/MECARDContactEncoder.java +++ b/android/src/com/google/zxing/client/android/encode/MECARDContactEncoder.java @@ -79,10 +79,10 @@ final class MECARDContactEncoder extends ContactEncoder { } private static class MECARDTelDisplayFormatter implements Formatter { - private static final Pattern NOT_DIGITS = Pattern.compile("[^0-9]+"); + private static final Pattern NOT_DIGITS_OR_PLUS = Pattern.compile("[^0-9+]+"); @Override public CharSequence format(CharSequence value, int index) { - return NOT_DIGITS.matcher(PhoneNumberUtils.formatNumber(value.toString())).replaceAll(""); + return NOT_DIGITS_OR_PLUS.matcher(PhoneNumberUtils.formatNumber(value.toString())).replaceAll(""); } }