Browse Source

Parsing issue with "(8108) 6309 390 906" (RU)

while parsing the number the first 3 digits are discarding, due to that it is giving the wrong country code as "86".
mandlil-patch-7
mandlil 2 years ago
committed by GitHub
parent
commit
1fa8418324
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java

+ 3
- 0
java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java View File

@ -2876,6 +2876,9 @@ public class PhoneNumberUtil {
String possibleCountryIddPrefix = "NonMatch"; String possibleCountryIddPrefix = "NonMatch";
if (defaultRegionMetadata != null) { if (defaultRegionMetadata != null) {
possibleCountryIddPrefix = defaultRegionMetadata.getInternationalPrefix(); possibleCountryIddPrefix = defaultRegionMetadata.getInternationalPrefix();
if ( defaultRegionMetadata.getId().equals("RU") && possibleCountryIddPrefix.contains("810")) {
possibleCountryIddPrefix = "00";
}
} }
CountryCodeSource countryCodeSource = CountryCodeSource countryCodeSource =


Loading…
Cancel
Save