JAVA: RFC3966 support, metadata update, extensive comment changes, getSupportedCountr...
authorlararennie@google.com <lararennie@google.com@ee073f10-1060-11df-b6a4-87a95322a99c>
Thu, 31 Mar 2011 12:21:45 +0000 (12:21 +0000)
committerlararennie@google.com <lararennie@google.com@ee073f10-1060-11df-b6a4-87a95322a99c>
Thu, 31 Mar 2011 12:21:45 +0000 (12:21 +0000)
git-svn-id: http://libphonenumber.googlecode.com/svn/trunk@145 ee073f10-1060-11df-b6a4-87a95322a99c

265 files changed:
java/release_notes.txt
java/resources/com/google/i18n/phonenumbers/BuildMetadataFromXml.java
java/resources/com/google/i18n/phonenumbers/BuildMetadataJsonFromXml.java
java/resources/com/google/i18n/phonenumbers/proto/phonemetadata.proto
java/resources/com/google/i18n/phonenumbers/src/PhoneNumberMetaData.xml
java/resources/com/google/i18n/phonenumbers/test/PhoneNumberMetaDataForTesting.xml
java/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java
java/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java
java/src/com/google/i18n/phonenumbers/Phonemetadata.java
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AC
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AD
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AE
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AF
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AG
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AI
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AL
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AM
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AN
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AO
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AR
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AS
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AT
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AU
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AW
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AZ
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BA
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BB
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BD
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BE
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BF
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BG
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BH
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BI
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BJ
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BL
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BM
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BN
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BO
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BR
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BS
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BT
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BW
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BY
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BZ
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CA
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CD
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CF
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CG
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CH
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CI
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CK
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CL
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CM
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CN
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CO
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CR
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CU
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CV
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CY
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CZ
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DE
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DJ
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DK
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DM
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DO
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DZ
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EC
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EE
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EG
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ER
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ES
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ET
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FI
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FJ
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FK
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FM
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FO
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FR
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GA
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GB
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GD
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GE
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GF
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GG
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GH
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GI
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GL
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GM
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GN
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GP
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GQ
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GR
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GT
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GU
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GW
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GY
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HK
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HN
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HR
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HT
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HU
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ID
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IE
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IL
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IM
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IN
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IO
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IQ
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IR
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IS
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IT
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JE
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JM
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JO
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JP
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KE
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KG
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KH
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KI
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KM
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KN
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KP
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KR
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KW
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KY
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KZ
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LA
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LB
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LC
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LI
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LK
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LR
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LS
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LT
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LU
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LV
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LY
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MA
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MC
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MD
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ME
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MF
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MG
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MH
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MK
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ML
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MM
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MN
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MO
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MP
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MQ
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MR
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MS
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MT
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MU
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MV
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MW
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MX
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MY
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MZ
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NA
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NC
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NE
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NF
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NG
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NI
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NL
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NO
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NP
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NR
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NU
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NZ
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_OM
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PA
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PE
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PF
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PG
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PH
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PK
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PL
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PM
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PR
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PS
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PT
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PW
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PY
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_QA
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RE
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RO
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RS
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RU
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RW
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SA
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SB
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SC
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SD
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SE
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SG
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SH
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SI
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SK
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SL
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SM
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SN
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SO
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SR
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ST
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SV
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SY
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SZ
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TC
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TD
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TF
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TG
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TH
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TJ
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TK
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TL
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TM
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TN
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TO
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TR
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TT
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TV
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TW
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TZ
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UA
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UG
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_US
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UY
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UZ
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VA
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VC
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VE
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VG
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VI
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VN
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VU
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_WF
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_WS
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_YE
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_YT
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZA
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZM
java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZW
java/test/com/google/i18n/phonenumbers/AsYouTypeFormatterTest.java
java/test/com/google/i18n/phonenumbers/ExampleNumbersTest.java
java/test/com/google/i18n/phonenumbers/PhoneNumberUtilTest.java
java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AD
java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AO
java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AR
java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AU
java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_BS
java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_DE
java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_GB
java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_IT
java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_JP
java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_KR
java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_MX
java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_NZ
java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_PL
java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_RE
java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_SG
java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_US
java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_YT

index 8604595..3460a14 100644 (file)
@@ -1,3 +1,20 @@
+Mar 31st, 2011
+* New functionality:
+ - Can parse and format numbers in RFC-3966 format.
+ - Added isAlphaNumber to check to see if a number is a "vanity" or "alpha" number
+ - Can format a number made up of alpha-characters in an "out-of-country" format (e.g. 0011 1
+   800-SIX-FLAG to dial an American alpha-number from Australia).
+* Code changes:
+ - Renamed private vars, private methods and fixed comments to try and differentiate between country
+   (calling) codes and region codes.
+ == Non-backwards-compatible API changes: ==
+ - Renamed getSupportedCountries to getSupportedRegions, as this more accurately reflects that the
+   library is based around region codes.
+ - getNationalSignificantNumber is no longer a static method, but is instead an instance method.
+* Metadata changes:
+ - Bug-fixes and updates for AU, AZ, EE, FI, IN, JO, KW, KZ, MV, RU, RR, VA
+ - New country: ME
+
 Mar 22nd, 2011
 * Metadata changes:
  - New mobile-number pattern for AU
index 04f7849..7f552d9 100644 (file)
@@ -154,6 +154,9 @@ public class BuildMetadataFromXml {
     if (element.hasAttribute("mainCountryForCode")) {
       metadata.setMainCountryForCode(true);
     }
+    if (element.hasAttribute("leadingZeroPossible")) {
+      metadata.setLeadingZeroPossible(true);
+    }
 
     // Extract availableFormats
     NodeList numberFormatElements = element.getElementsByTagName("numberFormat");
index 81d6ad5..5120311 100644 (file)
@@ -182,7 +182,7 @@ public class BuildMetadataJsonFromXml {
     // required string format = 2;
     jsArrayBuilder.append(format.getFormat());
     // repeated string leading_digits_pattern = 3;
-    int leadingDigitsPatternSize = format.getLeadingDigitsPatternCount();
+    int leadingDigitsPatternSize = format.leadingDigitsPatternSize();
     if (leadingDigitsPatternSize > 0) {
       jsArrayBuilder.beginArray();
       for (int i = 0; i < leadingDigitsPatternSize; i++) {
@@ -310,7 +310,7 @@ public class BuildMetadataJsonFromXml {
       jsArrayBuilder.append(null);
     }
     // repeated NumberFormat number_format = 19;
-    int numberFormatSize = metadata.getNumberFormatCount();
+    int numberFormatSize = metadata.numberFormatSize();
     if (numberFormatSize > 0) {
       jsArrayBuilder.beginArray();
       for (int i = 0; i < numberFormatSize; i++) {
@@ -321,7 +321,7 @@ public class BuildMetadataJsonFromXml {
       jsArrayBuilder.append(null);
     }
     // repeated NumberFormat intl_number_format = 20;
-    int intlNumberFormatSize = metadata.getIntlNumberFormatCount();
+    int intlNumberFormatSize = metadata.intlNumberFormatSize();
     if (intlNumberFormatSize > 0) {
       jsArrayBuilder.beginArray();
       for (int i = 0; i < intlNumberFormatSize; i++) {
index 42f0a99..0cf1fae 100644 (file)
@@ -218,6 +218,15 @@ message PhoneMetadata {
   // numbers are valid for all NANPA countries.) This field should be a regular
   // expression of the expected prefix match.
   optional string leading_digits = 23;
+
+  // The leading zero in a phone number is meaningful in some countries (e.g.
+  // Italy). This means they cannot be dropped from the national number when
+  // converting into international format. If leading zeros are possible for
+  // valid international numbers for this region/country then set this to true.
+  // This only needs to be set for the region that is the main_country_for_code
+  // and all regions associated with that calling code will use the same
+  // setting.
+  optional bool leading_zero_possible = 26 [default=false];
 }
 
 message PhoneMetadataCollection {
index 80bb09f..e4fd71f 100644 (file)
@@ -73,6 +73,7 @@
     <!ATTLIST territory preferredExtnPrefix CDATA #IMPLIED>
     <!ATTLIST territory nationalPrefixFormattingRule CDATA #IMPLIED>
     <!ATTLIST territory mainCountryForCode (true) #IMPLIED>
+    <!ATTLIST territory leadingZeroPossible (true) #IMPLIED>
     <!ATTLIST territory carrierCodeFormattingRule CDATA #IMPLIED>
     <!ATTLIST numberFormat nationalPrefixFormattingRule CDATA #IMPLIED>
     <!ATTLIST numberFormat carrierCodeFormattingRule CDATA #IMPLIED>
       </generalDesc>
       <fixedLine>
         <!-- Added the 164 area code after it was found in other online lists and in many online
-             numbers. -->
+             numbers. Also includes the area code 44 for CDMA regions, which are classified under
+             "Fixed Network" by the national plan. -->
         <nationalNumberPattern>
           (?:
             1(?:
               6[56]|
               79
             )|
-            365?\d
+            365?\d|
+            44\d{2}
           )\d{5}
         </nationalNumberPattern>
         <exampleNumber>123123456</exampleNumber>
       <mobile>
         <nationalNumberPattern>
           (?:
-            4[04]|
+            [46]0|
             5[015]|
-            60|
             7[07]
           )\d{7}
         </nationalNumberPattern>
     <!-- http://www.itu.int/oth/T0202000016/en -->
     <!-- The trunk prefix, formally 0, was dropped in the last reorganisation of the numbering plan.
          -->
-    <territory id="BZ" countryCode="501" internationalPrefix="00">
+    <territory id="BZ" countryCode="501" internationalPrefix="00" leadingZeroPossible="true">
       <availableFormats>
         <numberFormat pattern="(\d{3})(\d{4})">
           <leadingDigits>[2-8]</leadingDigits>
 
     <!-- Canada -->
     <!-- http://www.cnac.ca/canadian_dial_plan/canadian_dial_plan.htm -->
-    <territory id="CA" countryCode="1" internationalPrefix="011"
-      nationalPrefix="1">
+    <territory id="CA" countryCode="1" internationalPrefix="011" nationalPrefix="1">
       <generalDesc>
         <!-- NANPA country - uses US formatting rules -->
         <nationalNumberPattern>
 
     <!-- Congo (Rep. of the) (Brazzaville) -->
     <!-- http://www.itu.int/oth/T020200002E/en -->
-    <territory id="CG" countryCode="242" internationalPrefix="00">
+    <territory id="CG" countryCode="242" internationalPrefix="00" leadingZeroPossible="true">
       <availableFormats>
         <numberFormat pattern="(\d{2})(\d{3})(\d{4})">
           <leadingDigits>[02]</leadingDigits>
 
     <!-- Côte d'Ivoire -->
     <!-- http://www.itu.int/oth/T0202000031/en -->
-    <territory id="CI" countryCode="225" internationalPrefix="00">
+    <territory id="CI" countryCode="225" internationalPrefix="00" leadingZeroPossible="true">
       <availableFormats>
         <!-- Using format from online yellow pages over format implied in national numbering plan.
              -->
     <!-- http://www.tja.ee/public/Legislation_side/Numbering_/Estonian_NP_eng.htm -->
     <territory id="EE" countryCode="372" internationalPrefix="00">
       <availableFormats>
-        <!-- When 7-digit 70 numbers are phased out, they should be removed from this formatting
-             pattern and only 7[1-9] left. -->
         <numberFormat pattern="([34-79]\d{2})(\d{4})">
           <leadingDigits>
-            [3679]|
+            [369]|
             4[3-8]|
             5(?:
               [0-2]|
               5[0-478]|
               6[45]
-            )
+            )|
+            7[1-9]
           </leadingDigits>
           <leadingDigits>
-            [3679]|
+            [369]|
             4[3-8]|
             5(?:
               [02]|
                 4[0-4]|
                 5[1-589]
               )
-            )
+            )|
+            7[1-9]
           </leadingDigits>
           <format>$1 $2</format>
         </numberFormat>
           [3-9]\d{6,7}|
           800\d{6,7}
         </nationalNumberPattern>
-        <possibleNumberPattern>\d{6,10}</possibleNumberPattern>
+        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
       </generalDesc>
       <noInternationalDialling>
         <nationalNumberPattern>800[2-9]\d{3}</nationalNumberPattern>
         <exampleNumber>9001234</exampleNumber>
       </premiumRate>
       <personalNumber>
-        <!-- The third digit is optional until Jan 1st 2011, when numbers will have been changed to
-             the new 8 digit series. -->
-        <nationalNumberPattern>70[0-2]?\d{5}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7,8}</possibleNumberPattern>
+        <nationalNumberPattern>70[0-2]\d{5}</nationalNumberPattern>
+        <possibleNumberPattern>\d{8}</possibleNumberPattern>
         <exampleNumber>70012345</exampleNumber>
       </personalNumber>
       <shortCode>
         </numberFormat>
       </availableFormats>
       <generalDesc>
-        <nationalNumberPattern>[1-9]\d{4,11}</nationalNumberPattern>
+        <nationalNumberPattern>
+          1\d{4,11}|
+          [2-9]\d{4,10}
+        </nationalNumberPattern>
         <possibleNumberPattern>\d{5,12}</possibleNumberPattern>
       </generalDesc>
       <fixedLine>
 
     <!-- Gabon -->
     <!-- http://www.itu.int/oth/T020200004E/en -->
-    <territory id="GA" countryCode="241" internationalPrefix="00">
+    <territory id="GA" countryCode="241" internationalPrefix="00" leadingZeroPossible="true">
       <availableFormats>
         <numberFormat pattern="(\d{2})(\d{2})(\d{2})">
           <leadingDigits>[4-9]</leadingDigits>
          <numberFormat pattern="(\d{2})(\d{2})(\d{6})">
            <leadingDigits>
              7(?:
+               2[0579]|
                39|
-               5[5-9]|
-               [67][02-9]|
-               8[0-6]
+               4[0-389]|
+               5[04-9]|
+               6|
+               7[02-9]|
+               8[0-79]
              )|
              8(?:
                0[01589]|
            </leadingDigits>
            <leadingDigits>
              7(?:
+               2[0579]|
                39|
+               4[0-389]|
                5(?:
+                 0[0-5]|
+                 49|
                  50|
                  [6-9]
                )|
-               [67][02-9]|
-               8[0-6]
+               6|
+               7[02-9]|
+               8[0-79]
              )|
              8(?:
                0[01589]|
                 [013-8]\d
               )
             )
-          )[2-6]\d{5}</nationalNumberPattern>
+          )[2-6]\d{5}
+        </nationalNumberPattern>
         <possibleNumberPattern>\d{6,10}</possibleNumberPattern>
         <exampleNumber>1123456789</exampleNumber>
       </fixedLine>
-      <!--http://en.wikipedia.org/wiki/Mobile_telephone_numbering_in_India -->
+      <!-- http://en.wikipedia.org/wiki/Mobile_telephone_numbering_in_India -->
       <mobile>
-        <!-- A couple of additional prefixes not found on the wikipedia page,
-             namely 7696 and 779[56] are added because SMS messages have been
-             successfully sent to these numbers. -->
+        <!-- A couple of additional prefixes not found on the wikipedia page, such as 7796, are
+             added because SMS messages have been successfully sent to these numbers. It seems
+             almost impossible to know for some of these numbers whether they are land-line or
+             mobile, since the ranges overlap. -->
         <nationalNumberPattern>
           (?:
             7(?:
-              39[89]|
+              2(?:
+                0[04-9]|
+                5[09]|
+                7[568]|
+                9[39]
+              )|
+              3(?:
+                07|
+                7[3679]|
+                9[689]
+              )|
+              4(?:
+                05|
+                1[15-9]|
+                [29][89]|
+                39|
+                8[389]
+              )|
               5(?:
+                0[0-5]|
+                [47]9|
                 50|
-                6[6-8]|
-                79|
+                6[6-9]|
                 [89][7-9]
               )|
               6(?:
                 0[027]|
+                12|
                 20|
                 3[19]|
-                54|
-                65|
+                5[45]|
+                6[5-9]|
                 7[67]|
                 9[6-9]
               )|
               7(?:
-                0[89]|
-                3[589]|
+                0[289]|
+                3[5-9]|
                 42|
                 60|
                 9[5-9]
                 14|
                 2[7-9]|
                 4[25]|
-                6[09]
+                6[09]|
+                7[015689]|
+                9[0357-9]
               )
             )\d|
             9\d{4}|
             8(?:
               (?:
                 0[01589]|
-                1[024]
+                1[24]|
+                2[2369]|
+                4[023458]|
+                52|
+                6[0589]|
+                7[2569]
               )\d|
               8(?:
                 [079]\d|
 
     <!-- Italy -->
     <!-- http://en.wikipedia.org/wiki/%2B39 -->
-    <territory id="IT" countryCode="39" internationalPrefix="00">
+    <territory id="IT" countryCode="39" internationalPrefix="00" leadingZeroPossible="true">
       <availableFormats>
         <!-- The leading zero for fixed numbers will be prepended before the matching of these
              regular expressions. -->
       </availableFormats>
       <generalDesc>
         <nationalNumberPattern>[235-9]\d{7,8}</nationalNumberPattern>
-        <possibleNumberPattern>\d{8,9}</possibleNumberPattern>
+        <possibleNumberPattern>\d{7,9}</possibleNumberPattern>
       </generalDesc>
       <fixedLine>
         <!-- Used the plan from www.trc.gov.jo since it is much more complete than the plan on the
         <exampleNumber>90012345</exampleNumber>
       </premiumRate>
       <sharedCost>
-        <nationalNumberPattern>
-          8(?:
-            10\d|
-            5\d{2}|
-            7(?:
-             [02]0|
-             7[08]|
-             9[09]
-            )
-          )\d{4}
-        </nationalNumberPattern>
+        <nationalNumberPattern>85\d{6}</nationalNumberPattern>
         <possibleNumberPattern>\d{8}</possibleNumberPattern>
         <exampleNumber>85012345</exampleNumber>
       </sharedCost>
         <possibleNumberPattern>\d{9}</possibleNumberPattern>
         <exampleNumber>700123456</exampleNumber>
       </personalNumber>
+      <uan>
+        <!-- These numbers are Location Independent Services / Fixed cost according to
+             http://www.trc.gov.jo -->
+        <nationalNumberPattern>
+          8(?:
+            10|
+            [78]\d
+          )\d{5}
+        </nationalNumberPattern>
+        <possibleNumberPattern>\d{8}</possibleNumberPattern>
+        <exampleNumber>87101234</exampleNumber>
+      </uan>
     </territory>
 
     <!-- Japan -->
         <nationalNumberPattern>
           (?:
             5(?:
-              0[02]|
+              0[0-2]|
               5\d
             )|
             6(?:
               0[034679]|
               5[015-9]|
               6\d|
-              7[067]
+              7[067]|
+              99
             )|
             9(?:
               0[09]|
               4[049]|
+              66|
               [79]\d
             )
           )\d{5}
     </territory>
 
     <!-- Kazakhstan -->
-    <!-- http://en.wikipedia.org/wiki/Telephone_numbers_in_Kazakhstan -->
+    <!-- http://www.itu.int/oth/T020200006F/en -->
     <territory id="KZ" countryCode="7" internationalPrefix="8~10"
                nationalPrefix="8" nationalPrefixFormattingRule="$NP$FG">
        <!-- Formatting rules obtained from Russia. -->
       <generalDesc>
         <nationalNumberPattern>
           (?:
-            [67]\d{2}|
+            7\d{2}|
             80[09]
           )\d{7}
         </nationalNumberPattern>
         <possibleNumberPattern>\d{10}</possibleNumberPattern>
       </generalDesc>
+      <noInternationalDialling>
+        <nationalNumberPattern>751\d{7}</nationalNumberPattern>
+        <possibleNumberPattern>\d{10}</possibleNumberPattern>
+        <exampleNumber>7511234567</exampleNumber>
+      </noInternationalDialling>
       <fixedLine>
         <!-- VSAT numbers are also included here. -->
         <nationalNumberPattern>
               )|
               3(?:
                 2\d|
-                3[1-7]|
-                4[1235-9]|
+                3[1-79]|
+                4[0-35-9]|
                 59
               )|
               4(?:
                 2\d|
                 3[013-79]|
-                4[0-58]|
+                4[0-8]|
                 5[1-79]
               )|
               5(?:
                 59
               )|
               6(?:
-                22|
+                2\d|
                 [34]\d|
-                5[19]
+                5[19]|
+                61
               )|
               72\d|
               8(?:
                 [27]\d|
                 3[1-46-9]|
-                4[0-4]|
+                4[0-5]|
               )
             )|
             2(?:
                 5[139]|
               )|
               4(?:
-                22|
-                3[1235-8]
+                2\d|
+                3[1235-9]|
+                59
               )|
               5(?:
                 [23]\d|
-                4[0124-8]|
-                59
+                4[01246-8]|
+                59|
+                61
               )|
               6(?:
-                22|
+                2\d|
                 3[1-9]|
                 4[0-4]|
                 59
               )|
               9(?:
                 2\d|
-                3[12478]|
+                3[124578]|
                 59
               )
             )|
         <exampleNumber>7123456789</exampleNumber>
       </fixedLine>
       <mobile>
-        <!-- Wikipedia says that 6xx is used for mobile phone numbers. Other metadata comes from ITU
-             document. -->
         <nationalNumberPattern>
           7(?:
             0[01257]\d{2}|
-            1[2-578]9[01]|
-            2(?:
-              [13-6]9[01]|
-              7(?:
-                58|
-                9[01]
-              )
-            )|
             6[02-4]\d{2}|
             7[157]\d{2}
-          )\d{5}|
-          6\d{9}
+          )\d{5}
         </nationalNumberPattern>
-        <exampleNumber>7129012345</exampleNumber>
+        <exampleNumber>7710009998</exampleNumber>
       </mobile>
       <tollFree>
         <nationalNumberPattern>800\d{7}</nationalNumberPattern>
         <nationalNumberPattern>809\d{7}</nationalNumberPattern>
         <exampleNumber>8091234567</exampleNumber>
       </premiumRate>
+      <voip>
+        <nationalNumberPattern>751\d{7}</nationalNumberPattern>
+        <exampleNumber>7511234567</exampleNumber>
+      </voip>
     </territory>
 
     <!-- Lao People's Dem. Rep. -->
     </territory>
 
     <!-- Montenegro -->
-    <territory id="ME" countryCode="382" internationalPrefix="99"
-               nationalPrefix="0">
+    <!-- http://www.itu.int/oth/T02020000DA/en
+         http://en.wikipedia.org/wiki/Telephone_numbers_in_Montenegro
+         http://www.ekip.me/numeracija/dodijeljena.php -->
+    <territory id="ME" countryCode="382" internationalPrefix="00" nationalPrefix="0"
+               nationalPrefixFormattingRule="$NP$FG">
+      <availableFormats>
+         <numberFormat pattern="(\d{2})(\d{3})(\d{3})">
+          <leadingDigits>[2-57-9]|6[3789]</leadingDigits>
+          <leadingDigits>
+            [2-57-9]|
+            6(?:
+              [389]|
+              7(?:
+                [0-8]|
+                9[3-9]
+              )
+            )
+          </leadingDigits>
+          <format>$1 $2 $3</format>
+        </numberFormat>
+        <numberFormat pattern="(67)(9)(\d{3})(\d{3})">
+          <leadingDigits>679</leadingDigits>
+          <leadingDigits>679[0-2]</leadingDigits>
+          <format>$1 $2 $3 $4</format>
+        </numberFormat>
+      </availableFormats>
+      <generalDesc>
+        <nationalNumberPattern>[2-9]\d{7,8}</nationalNumberPattern>
+        <possibleNumberPattern>\d{6,9}</possibleNumberPattern>
+      </generalDesc>
+      <fixedLine>
+        <!-- Fixed line numbers have prefix 20,30,31,32,33,40,41,50,51,52 followed by 6 digits.
+             The valid options for the third digit were from
+             http://www.ekip.me/numeracija/dodijeljena.php -->
+        <nationalNumberPattern>
+          (?:
+            20[2-8]|
+            3(?:
+              0[2-7]|
+              1[35-7]|
+              2[367]|
+              3[4-7]
+            )|
+            4(?:
+              0[237]|
+              1[2467]
+            )|
+            5(?:
+              0[47]|
+              1[27]|
+              2[378]
+            )
+          )\d{5}
+        </nationalNumberPattern>
+        <possibleNumberPattern>\d{6,8}</possibleNumberPattern>
+        <exampleNumber>30234567</exampleNumber>
+      </fixedLine>
+      <mobile>
+        <!-- Mobile numbers start with 632, 67, 68 or 69. -->
+        <nationalNumberPattern>
+          6(?:
+            32\d|
+            [89]\d{2}|
+            7(?:
+              [0-8]\d|
+              9(?:
+                [3-9]|
+                [0-2]\d
+              )
+            )
+          )\d{4}
+        </nationalNumberPattern>
+        <!-- According to ITU it is possible for the numbers to be between length 4-12
+             (http://www.itu.int/oth/T02020000DA/en). However, in reality they seem to be 8 or 9
+             digits long. -->
+        <possibleNumberPattern>\d{8,9}</possibleNumberPattern>
+        <exampleNumber>67622901</exampleNumber>
+      </mobile>
+      <tollFree>
+        <!-- All toll free numbers have prefix 80 followed by 02 or 08. -->
+        <nationalNumberPattern>800[28]\d{4}</nationalNumberPattern>
+        <possibleNumberPattern>\d{8}</possibleNumberPattern>
+        <exampleNumber>80080002</exampleNumber>
+      </tollFree>
+      <premiumRate>
+        <!-- Numbers with prefix 88, 94 or 95 are services with additional charges. -->
+        <nationalNumberPattern>
+          (?:
+            88\d|
+            9(?:
+              4[13-8]|
+              5[16-8]
+            )
+          )\d{5}
+        </nationalNumberPattern>
+        <possibleNumberPattern>\d{8}</possibleNumberPattern>
+        <exampleNumber>94515151</exampleNumber>
+      </premiumRate>
+      <voip>
+        <!-- VOIP are prefixed with 78. -->
+        <nationalNumberPattern>78[134579]\d{5}</nationalNumberPattern>
+        <possibleNumberPattern>\d{8}</possibleNumberPattern>
+        <exampleNumber>78108780</exampleNumber>
+      </voip>
+      <uan>
+        <!-- Corporate Telephony are prefixed with 77. -->
+        <nationalNumberPattern>77\d{6}</nationalNumberPattern>
+        <possibleNumberPattern>\d{8}</possibleNumberPattern>
+        <exampleNumber>77273012</exampleNumber>
+      </uan>
+      <shortCode>
+        <!-- Emergency and other services. -->
+        <nationalNumberPattern>
+          1(?:
+            16\d{3}|
+            2\d{1,2}|
+            [0135]\d{2}|
+            4\d{2,3}|
+            9\d{3}
+          )
+        </nationalNumberPattern>
+        <possibleNumberPattern>\d{3,6}</possibleNumberPattern>
+        <exampleNumber>123</exampleNumber>
+      </shortCode>
     </territory>
 
     <!-- Madagascar -->
       preferredInternationalPrefix="00">
       <availableFormats>
         <numberFormat pattern="(\d{3})(\d{4})">
+          <leadingDigits>
+            [367]|
+            9(?:
+              [1-9]|
+              0[1-9]
+            )
+          </leadingDigits>
           <format>$1-$2</format>
         </numberFormat>
+        <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
+          <leadingDigits>900</leadingDigits>
+          <format>$1 $2 $3</format>
+        </numberFormat>
       </availableFormats>
       <generalDesc>
-        <nationalNumberPattern>[3679]\d{6}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
+        <nationalNumberPattern>
+          [367]\d{6}|
+          9(?:
+            00\d{7}|
+            \d{6}
+          )
+        </nationalNumberPattern>
+        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
       </generalDesc>
       <fixedLine>
-        <!-- 300 and 330 have been added as prefixes from online searches, since the numbers seemed
-             to be diallable. -->
+        <!-- 300 has been added as prefixes from online searches, since the numbers seemed to be
+             diallable. -->
         <nationalNumberPattern>
           (?:
             3(?:
-              00|
+              0[01]|
               3[0-59]|
             )|
             6(?:
               [567][02468]|
-              8[024689]
+              8[024689]|
+              90
             )
           )\d{4}
         </nationalNumberPattern>
+        <possibleNumberPattern>\d{7}</possibleNumberPattern>
         <exampleNumber>6701234</exampleNumber>
       </fixedLine>
       <mobile>
         <nationalNumberPattern>
           (?:
-            7(?:
-              [679]\d|
-              8[02-9]
-            )|
-            9[6-9]\d
-          )\d{4}
+            7[36-9]|
+            9[6-9]
+          )\d{5}
         </nationalNumberPattern>
+        <possibleNumberPattern>\d{7}</possibleNumberPattern>
         <exampleNumber>7712345</exampleNumber>
       </mobile>
       <pager>
         <nationalNumberPattern>781\d{4}</nationalNumberPattern>
+        <possibleNumberPattern>\d{7}</possibleNumberPattern>
         <exampleNumber>7812345</exampleNumber>
       </pager>
+      <premiumRate>
+        <nationalNumberPattern>900\d{7}</nationalNumberPattern>
+        <possibleNumberPattern>\d{10}</possibleNumberPattern>
+        <exampleNumber>9001234567</exampleNumber>
+      </premiumRate>
       <shortCode>
         <nationalNumberPattern>
           1(?:
 
     <!-- Niger -->
     <!-- http://www.itu.int/oth/T020200009B/en -->
-    <territory id="NE" countryCode="227" internationalPrefix="00">
+    <territory id="NE" countryCode="227" internationalPrefix="00" leadingZeroPossible="true">
       <availableFormats>
         <numberFormat pattern="([029]\d)(\d{2})(\d{2})(\d{2})">
           <leadingDigits>
     <!-- Norway -->
     <!--
     http://www.npt.no/portal/page/portal/PG_NPT_NO_EN/PAG_NPT_EN_HOME/PAG_RESOURCE_TEXT -->
-    <territory id="NO" countryCode="47" internationalPrefix="00">
+    <territory id="NO" countryCode="47" internationalPrefix="00" leadingZeroPossible="true">
       <availableFormats>
         <numberFormat pattern="([489]\d{2})(\d{2})(\d{3})">
           <leadingDigits>[489]</leadingDigits>
           <leadingDigits>[34689]</leadingDigits>
           <format>$1 $2-$3-$4</format>
         </numberFormat>
-        <numberFormat pattern="([67]\d{2})(\d{3})(\d{4})">
-          <leadingDigits>[67]</leadingDigits>
+        <numberFormat pattern="(7\d{2})(\d{3})(\d{4})">
+          <leadingDigits>7</leadingDigits>
           <format>$1 $2 $3</format>
         </numberFormat>
       </availableFormats>
          and without this area code. The nationalPrefixForParsing and nationalPrefixTransformRule
          are used to ensure that if the 0549 is not present, it will be added. -->
     <territory id="SM" countryCode="378" internationalPrefix="00"
-      nationalPrefixForParsing="(?:0549)?([89]\d{5})" nationalPrefixTransformRule="0549$1">
+      nationalPrefixForParsing="(?:0549)?([89]\d{5})" nationalPrefixTransformRule="0549$1"
+      leadingZeroPossible="true">
       <availableFormats>
         <numberFormat pattern="(\d{2})(\d{2})(\d{2})(\d{2})">
           <leadingDigits>[5-7]</leadingDigits>
     <!-- http://www.itu.int/oth/T02020000C6/en -->
     <!-- Note this plan is scheduled to change in February 2011 so should be updated at that time.
          -->
-    <territory id="SZ" countryCode="268" internationalPrefix="00">
+    <territory id="SZ" countryCode="268" internationalPrefix="00" leadingZeroPossible="true">
       <availableFormats>
         <numberFormat pattern="(\d{3})(\d{4})">
           <leadingDigits>[2-6]</leadingDigits>
 
     <!-- Togo -->
     <!-- http://www.itu.int/oth/T02020000D1/en -->
-    <territory id="TG" countryCode="228" internationalPrefix="00">
+    <territory id="TG" countryCode="228" internationalPrefix="00" leadingZeroPossible="true">
       <availableFormats>
         <numberFormat pattern="(\d{3})(\d{2})(\d{2})">
           <format>$1 $2 $3</format>
               2[1-4]
             )|
             6(?:
+              07|
               1[4-6]|
               2[1-9]|
               [3-6]\d|
     <!-- http://en.wikipedia.org/wiki/Telephone_numbers_in_Vatican_City -->
     <!-- Note that numbers here are also accessible via Italy (+39 and prefix of 06 698) but can
          also be dialled with the Vatican City country code. -->
-    <territory id="VA" countryCode="379" internationalPrefix="00" >
+    <territory id="VA" countryCode="379" internationalPrefix="00" leadingZeroPossible="true">
       <availableFormats>
         <numberFormat pattern="(06)(\d{4})(\d{4})">
           <format>$1 $2 $3</format>
index c01acf7..8196911 100644 (file)
         </numberFormat>
         <numberFormat pattern="(\d{2})(\d{4,9})">
           <leadingDigits>[34]0|[68]9</leadingDigits>
-          <format>$1 $2</format>
+          <format>$1/$2</format>
         </numberFormat>
         <!-- Extra fictional pattern for shorter numbers with the same prefixes as the following
              pattern, to illustrate the problem the AYTF has with real patterns that share this
 
     <!-- Italy -->
     <!-- http://en.wikipedia.org/wiki/%2B39 -->
-    <territory id="IT" countryCode="39" internationalPrefix="00">
+    <territory id="IT" countryCode="39" internationalPrefix="00" leadingZeroPossible="true">
       <availableFormats>
         <numberFormat pattern="(\d{2})(\d{4})(\d{4})">
           <leadingDigits>0[26]</leadingDigits>
index 11b8ba0..15d9313 100644 (file)
@@ -133,9 +133,9 @@ public class AsYouTypeFormatter {
 
   private void getAvailableFormats(String leadingThreeDigits) {
     List<NumberFormat> formatList =
-        (isInternationalFormatting && currentMetaData.getIntlNumberFormatCount() > 0)
-        ? currentMetaData.getIntlNumberFormatList()
-        : currentMetaData.getNumberFormatList();
+        (isInternationalFormatting && currentMetaData.intlNumberFormatSize() > 0)
+        ? currentMetaData.intlNumberFormats()
+        : currentMetaData.numberFormats();
     possibleFormats.addAll(formatList);
     narrowDownPossibleFormats(leadingThreeDigits);
   }
@@ -146,7 +146,7 @@ public class AsYouTypeFormatter {
     Iterator<NumberFormat> it = possibleFormats.iterator();
     while (it.hasNext()) {
       NumberFormat format = it.next();
-      if (format.getLeadingDigitsPatternCount() > indexOfLeadingDigitsPattern) {
+      if (format.leadingDigitsPatternSize() > indexOfLeadingDigitsPattern) {
         Pattern leadingDigitsPattern =
             regexCache.getPatternForRegex(
                 format.getLeadingDigitsPattern(indexOfLeadingDigitsPattern));
index 52b826e..13a5bc2 100644 (file)
@@ -44,6 +44,9 @@ import java.util.regex.Pattern;
  * Utility for international phone numbers. Functionality includes formatting, parsing and
  * validation.
  *
+ * <p>If you use this library, and want to be notified about important changes, please sign up to
+ * our <a href="http://groups.google.com/group/libphonenumber-discuss/about">mailing list</a>.
+ *
  * @author Shaopeng Jia
  * @author Lara Rennie
  */
@@ -53,36 +56,38 @@ public class PhoneNumberUtil {
   // The minimum and maximum length of the national significant number.
   private static final int MIN_LENGTH_FOR_NSN = 3;
   static final int MAX_LENGTH_FOR_NSN = 15;
-  // The maximum length of the country code.
+  // The maximum length of the country calling code.
   static final int MAX_LENGTH_COUNTRY_CODE = 3;
   static final String META_DATA_FILE_PREFIX =
       "/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto";
   private String currentFilePrefix = META_DATA_FILE_PREFIX;
   private static final Logger LOGGER = Logger.getLogger(PhoneNumberUtil.class.getName());
 
-  // A mapping from a country code to the region codes which denote the country/region
-  // represented by that country code. In the case of multiple countries sharing a calling code,
-  // such as the NANPA countries, the one indicated with "isMainCountryForCode" in the metadata
-  // should be first.
-  private Map<Integer, List<String>> countryCodeToRegionCodeMap = null;
+  // A mapping from a country calling code to the region codes which denote the region represented
+  // by that country calling code. In the case of multiple regions sharing a calling code, such as
+  // the NANPA regions, the one indicated with "isMainCountryForCode" in the metadata should be
+  // first.
+  private Map<Integer, List<String>> countryCallingCodeToRegionCodeMap = null;
 
-  // The set of countries the library supports.
+  // The set of regions the library supports.
   // There are roughly 220 of them and we set the initial capacity of the HashSet to 300 to offer a
   // load factor of roughly 0.75.
-  private final Set<String> supportedCountries = new HashSet<String>(300);
+  private final Set<String> supportedRegions = new HashSet<String>(300);
 
   // Region-code for the unknown region.
   private static final String UNKNOWN_REGION = "ZZ";
 
-  // The set of countries that share country code 1.
-  // There are roughly 26 countries of them and we set the initial capacity of the HashSet to 35
-  // to offer a load factor of roughly 0.75.
-  private final Set<String> nanpaCountries = new HashSet<String>(35);
+  // The set of regions that share country code 1.
+  // There are roughly 26 regions and we set the initial capacity of the HashSet to 35 to offer a
+  // load factor of roughly 0.75.
+  private final Set<String> nanpaRegions = new HashSet<String>(35);
   private static final int NANPA_COUNTRY_CODE = 1;
 
   // The PLUS_SIGN signifies the international prefix.
   static final char PLUS_SIGN = '+';
 
+  private static final String RFC3966_EXTN_PREFIX = ";ext=";
+
   // These mappings map a character (key) to a specific digit that should replace it for
   // normalization purposes. Non-European digits that may be used in phone numbers are mapped to a
   // European equivalent.
@@ -94,45 +99,53 @@ public class PhoneNumberUtil {
   // For performance reasons, amalgamate both into one map.
   private static final Map<Character, Character> ALL_NORMALIZATION_MAPPINGS;
 
+  // Separate map of all symbols that we wish to retain when formatting alpha numbers. This
+  // includes digits, ASCII letters and number grouping symbols such as "-" and " ".
+  private static final Map<Character, Character> ALL_PLUS_NUMBER_GROUPING_SYMBOLS;
+
   static {
+    // Simple ASCII digits map used to populate DIGIT_MAPPINGS and ALPHA_MAPPINGS.
+    HashMap<Character, Character> asciiDigitMappings = new HashMap<Character, Character>();
+    asciiDigitMappings.put('0', '0');
+    asciiDigitMappings.put('1', '1');
+    asciiDigitMappings.put('2', '2');
+    asciiDigitMappings.put('3', '3');
+    asciiDigitMappings.put('4', '4');
+    asciiDigitMappings.put('5', '5');
+    asciiDigitMappings.put('6', '6');
+    asciiDigitMappings.put('7', '7');
+    asciiDigitMappings.put('8', '8');
+    asciiDigitMappings.put('9', '9');
+
     HashMap<Character, Character> digitMap = new HashMap<Character, Character>(50);
-    digitMap.put('0', '0');
+    digitMap.putAll(asciiDigitMappings);
     digitMap.put('\uFF10', '0');  // Fullwidth digit 0
     digitMap.put('\u0660', '0');  // Arabic-indic digit 0
     digitMap.put('\u06F0', '0');  // Eastern-Arabic digit 0
-    digitMap.put('1', '1');
     digitMap.put('\uFF11', '1');  // Fullwidth digit 1
     digitMap.put('\u0661', '1');  // Arabic-indic digit 1
     digitMap.put('\u06F1', '1');  // Eastern-Arabic digit 1
-    digitMap.put('2', '2');
     digitMap.put('\uFF12', '2');  // Fullwidth digit 2
     digitMap.put('\u0662', '2');  // Arabic-indic digit 2
     digitMap.put('\u06F2', '2');  // Eastern-Arabic digit 2
-    digitMap.put('3', '3');
     digitMap.put('\uFF13', '3');  // Fullwidth digit 3
     digitMap.put('\u0663', '3');  // Arabic-indic digit 3
     digitMap.put('\u06F3', '3');  // Eastern-Arabic digit 3
-    digitMap.put('4', '4');
     digitMap.put('\uFF14', '4');  // Fullwidth digit 4
     digitMap.put('\u0664', '4');  // Arabic-indic digit 4
     digitMap.put('\u06F4', '4');  // Eastern-Arabic digit 4
-    digitMap.put('5', '5');
     digitMap.put('\uFF15', '5');  // Fullwidth digit 5
     digitMap.put('\u0665', '5');  // Arabic-indic digit 5
     digitMap.put('\u06F5', '5');  // Eastern-Arabic digit 5
-    digitMap.put('6', '6');
     digitMap.put('\uFF16', '6');  // Fullwidth digit 6
     digitMap.put('\u0666', '6');  // Arabic-indic digit 6
     digitMap.put('\u06F6', '6');  // Eastern-Arabic digit 6
-    digitMap.put('7', '7');
     digitMap.put('\uFF17', '7');  // Fullwidth digit 7
     digitMap.put('\u0667', '7');  // Arabic-indic digit 7
     digitMap.put('\u06F7', '7');  // Eastern-Arabic digit 7
-    digitMap.put('8', '8');
     digitMap.put('\uFF18', '8');  // Fullwidth digit 8
     digitMap.put('\u0668', '8');  // Arabic-indic digit 8
     digitMap.put('\u06F8', '8');  // Eastern-Arabic digit 8
-    digitMap.put('9', '9');
     digitMap.put('\uFF19', '9');  // Fullwidth digit 9
     digitMap.put('\u0669', '9');  // Arabic-indic digit 9
     digitMap.put('\u06F9', '9');  // Eastern-Arabic digit 9
@@ -171,31 +184,38 @@ public class PhoneNumberUtil {
     combinedMap.putAll(alphaMap);
     combinedMap.putAll(digitMap);
     ALL_NORMALIZATION_MAPPINGS = Collections.unmodifiableMap(combinedMap);
-  }
 
-  // A list of all country codes where national significant numbers (excluding any national prefix)
-  // exist that start with a leading zero.
-  private static final Set<Integer> LEADING_ZERO_COUNTRIES;
-  static {
-    HashSet<Integer> aSet = new HashSet<Integer>(10);
-    aSet.add(39);  // Italy
-    aSet.add(47);  // Norway
-    aSet.add(225);  // Cote d'Ivoire
-    aSet.add(227);  // Niger
-    aSet.add(228);  // Togo
-    aSet.add(241);  // Gabon
-    aSet.add(242);  // Congo (Rep. of the)
-    aSet.add(268);  // Swaziland
-    aSet.add(378);  // San Marino
-    aSet.add(379);  // Vatican City
-    aSet.add(501);  // Belize
-    LEADING_ZERO_COUNTRIES = Collections.unmodifiableSet(aSet);
-  }
-
-  // Pattern that makes it easy to distinguish whether a country has a unique international dialing
-  // prefix or not. If a country has a unique international prefix (e.g. 011 in USA), it will be
+    HashMap<Character, Character> allPlusNumberGroupings = new HashMap<Character, Character>();
+    // Put (lower letter -> upper letter) and (upper letter -> upper letter) mappings.
+    for (char c : ALPHA_MAPPINGS.keySet()) {
+      allPlusNumberGroupings.put(Character.toLowerCase(c), c);
+      allPlusNumberGroupings.put(c, c);
+    }
+    allPlusNumberGroupings.putAll(asciiDigitMappings);
+    // Put grouping symbols.
+    allPlusNumberGroupings.put('-', '-');
+    allPlusNumberGroupings.put('\uFF0D', '-');
+    allPlusNumberGroupings.put('\u2010', '-');
+    allPlusNumberGroupings.put('\u2011', '-');
+    allPlusNumberGroupings.put('\u2012', '-');
+    allPlusNumberGroupings.put('\u2013', '-');
+    allPlusNumberGroupings.put('\u2014', '-');
+    allPlusNumberGroupings.put('\u2015', '-');
+    allPlusNumberGroupings.put('\u2212', '-');
+    allPlusNumberGroupings.put('/', '/');
+    allPlusNumberGroupings.put('\uFF0F', '/');
+    allPlusNumberGroupings.put(' ', ' ');
+    allPlusNumberGroupings.put('\u3000', ' ');
+    allPlusNumberGroupings.put('\u2060', ' ');
+    allPlusNumberGroupings.put('.', '.');
+    allPlusNumberGroupings.put('\uFF0E', '.');
+    ALL_PLUS_NUMBER_GROUPING_SYMBOLS = Collections.unmodifiableMap(allPlusNumberGroupings);
+  }
+
+  // Pattern that makes it easy to distinguish whether a region has a unique international dialing
+  // prefix or not. If a region has a unique international prefix (e.g. 011 in USA), it will be
   // represented as a string that contains a sequence of ASCII digits. If there are multiple
-  // available international prefixes in a country, they will be represented as a regex string that
+  // available international prefixes in a region, they will be represented as a regex string that
   // always contains character(s) other than ASCII digits.
   // Note this regex also includes tilde, which signals waiting for the tone.
   private static final Pattern UNIQUE_INTERNATIONAL_PREFIX =
@@ -218,6 +238,7 @@ public class PhoneNumberUtil {
       Arrays.toString(ALPHA_MAPPINGS.keySet().toArray()).toLowerCase().replaceAll("[, \\[\\]]", "");
   static final String PLUS_CHARS = "+\uFF0B";
   private static final Pattern PLUS_CHARS_PATTERN = Pattern.compile("[" + PLUS_CHARS + "]+");
+  private static final Pattern SEPARATOR_PATTERN = Pattern.compile("[" + VALID_PUNCTUATION + "]+");
   private static final Pattern CAPTURING_DIGIT_PATTERN =
       Pattern.compile("([" + VALID_DIGITS + "])");
 
@@ -264,27 +285,30 @@ public class PhoneNumberUtil {
   // Default extension prefix to use when formatting. This will be put in front of any extension
   // component of the number, after the main national number is formatted. For example, if you wish
   // the default extension formatting to be " extn: 3456", then you should specify " extn: " here
-  // as the default extension prefix. This can be overridden by country-specific preferences.
+  // as the default extension prefix. This can be overridden by region-specific preferences.
   private static final String DEFAULT_EXTN_PREFIX = " ext. ";
 
   // Regexp of all possible ways to write extensions, for use when parsing. This will be run as a
-  // case-insensitive regexp match. Wide character versions are also provided after each ascii
-  // version. There are two regular expressions here: the more generic one starts with optional
-  // white space and ends with an optional full stop (.), followed by zero or more spaces/tabs and
-  // then the numbers themselves. The other one covers the special case of American numbers where
-  // the extension is written with a hash at the end, such as "- 503#".
+  // case-insensitive regexp match. Wide character versions are also provided after each ASCII
+  // version. There are three regular expressions here. The first covers RFC 3966 format, where the
+  // extension is added using ";ext=". The second more generic one starts with optional white space
+  // and ends with an optional full stop (.), followed by zero or more spaces/tabs and then the
+  // numbers themselves. The other one covers the special case of American numbers where the
+  // extension is written with a hash at the end, such as "- 503#".
   // Note that the only capturing groups should be around the digits that you want to capture as
   // part of the extension, or else parsing will fail!
   // Canonical-equivalence doesn't seem to be an option with Android java, so we allow two options
   // for representing the accented o - the character itself, and one in the unicode decomposed form
   // with the combining acute accent.
-  static final String KNOWN_EXTN_PATTERNS = "[ \u00A0\\t,]*" +
-      "(?:ext(?:ensi(?:o\u0301?|\u00F3))?n?|" +
+  private static final String CAPTURING_EXTN_DIGITS = "([" + VALID_DIGITS + "]{1,7})";
+  static final String KNOWN_EXTN_PATTERNS =
+      RFC3966_EXTN_PREFIX + CAPTURING_EXTN_DIGITS + "|" +
+      "[ \u00A0\\t,]*(?:ext(?:ensi(?:o\u0301?|\u00F3))?n?|" +
       "\uFF45\uFF58\uFF54\uFF4E?|[,x\uFF58#\uFF03~\uFF5E]|int|anexo|\uFF49\uFF4E\uFF54)" +
-      "[:\\.\uFF0E]?[ \u00A0\\t,-]*([" + VALID_DIGITS + "]{1,7})#?|[- ]+([" + VALID_DIGITS +
-      "]{1,5})#";
+      "[:\\.\uFF0E]?[ \u00A0\\t,-]*" + CAPTURING_EXTN_DIGITS + "#?|" +
+      "[- ]+([" + VALID_DIGITS + "]{1,5})#";
 
-  // Regexp of all known extension prefixes used by different countries followed by 1 or more valid
+  // Regexp of all known extension prefixes used by different regions followed by 1 or more valid
   // digits, for use when parsing.
   private static final Pattern EXTN_PATTERN =
       Pattern.compile("(?:" + KNOWN_EXTN_PATTERNS + ")$", REGEX_FLAGS);
@@ -303,10 +327,9 @@ public class PhoneNumberUtil {
   private static PhoneNumberUtil instance = null;
 
   // A mapping from a region code to the PhoneMetadata for that region.
-  private Map<String, PhoneMetadata> countryToMetadataMap =
-      new HashMap<String, PhoneMetadata>();
+  private Map<String, PhoneMetadata> regionToMetadataMap = new HashMap<String, PhoneMetadata>();
 
-  // A cache for frequently used country-specific regular expressions.
+  // A cache for frequently used region-specific regular expressions.
   // As most people use phone numbers primarily from one to two countries, and there are roughly 60
   // regular expressions needed, the initial capacity of 100 offers a rough load factor of 0.75.
   private RegexCache regexCache = new RegexCache(100);
@@ -316,14 +339,17 @@ public class PhoneNumberUtil {
    * E. 123. For example, the number of the Google Zurich office will be written as
    * "+41 44 668 1800" in INTERNATIONAL format, and as "044 668 1800" in NATIONAL format.
    * E164 format is as per INTERNATIONAL format but with no formatting applied, e.g. +41446681800.
+   * RFC3966 is as per INTERNATIONAL format, but with all spaces and other separating symbols
+   * replaced with a hyphen, and with any phone number extension appended with ";ext=".
    *
    * Note: If you are considering storing the number in a neutral format, you are highly advised to
-   * use the phonenumber.proto.
+   * use the PhoneNumber class.
    */
   public enum PhoneNumberFormat {
     E164,
     INTERNATIONAL,
-    NATIONAL
+    NATIONAL,
+    RFC3966
   }
 
   /**
@@ -332,7 +358,7 @@ public class PhoneNumberUtil {
   public enum PhoneNumberType {
     FIXED_LINE,
     MOBILE,
-    // In some countries (e.g. the USA), it is impossible to distinguish between fixed-line and
+    // In some regions (e.g. the USA), it is impossible to distinguish between fixed-line and
     // mobile numbers by looking at the phone number itself.
     FIXED_LINE_OR_MOBILE,
     // Freephone lines
@@ -353,7 +379,7 @@ public class PhoneNumberUtil {
     // specific offices, but allow one number to be used for a company.
     UAN,
     // A phone number is of type UNKNOWN when it does not fit any of the known patterns for a
-    // specific country.
+    // specific region.
     UNKNOWN
   }
 
@@ -416,10 +442,10 @@ public class PhoneNumberUtil {
 
   private void init(String filePrefix) {
     currentFilePrefix = filePrefix;
-    for (List<String> regionCodes : countryCodeToRegionCodeMap.values()) {
-      supportedCountries.addAll(regionCodes);
+    for (List<String> regionCodes : countryCallingCodeToRegionCodeMap.values()) {
+      supportedRegions.addAll(regionCodes);
     }
-    nanpaCountries.addAll(countryCodeToRegionCodeMap.get(NANPA_COUNTRY_CODE));
+    nanpaRegions.addAll(countryCallingCodeToRegionCodeMap.get(NANPA_COUNTRY_CODE));
   }
 
   private void loadMetadataForRegionFromFile(String filePrefix, String regionCode) {
@@ -431,7 +457,7 @@ public class PhoneNumberUtil {
       PhoneMetadataCollection metadataCollection = new PhoneMetadataCollection();
       metadataCollection.readExternal(in);
       for (PhoneMetadata metadata : metadataCollection.getMetadataList()) {
-        countryToMetadataMap.put(regionCode, metadata);
+        regionToMetadataMap.put(regionCode, metadata);
       }
     } catch (IOException e) {
       LOGGER.log(Level.WARNING, e.toString());
@@ -461,6 +487,7 @@ public class PhoneNumberUtil {
       Matcher trailingCharsMatcher = UNWANTED_END_CHAR_PATTERN.matcher(number);
       if (trailingCharsMatcher.find()) {
         number = number.substring(0, trailingCharsMatcher.start());
+        LOGGER.log(Level.FINER, "Stripped trailing characters: " + number);
       }
       // Check for extra numbers at the end.
       Matcher secondNumber = SECOND_NUMBER_START_PATTERN.matcher(number);
@@ -547,15 +574,16 @@ public class PhoneNumberUtil {
   }
 
   /**
-   * Gets the length of the geographical area code from the national_number field of the PhoneNumber
-   * object passed in, so that clients could use it to split a national significant number into
-   * geographical area code and subscriber number. It works in such a way that the resultant
-   * subscriber number should be diallable, at least on some devices. An example of how this could
-   * be used:
+   * Gets the length of the geographical area code in the {@code nationalNumber_} field of the
+   * PhoneNumber object passed in, so that clients could use it to split a national significant
+   * number into geographical area code and subscriber number. It works in such a way that the
+   * resultant subscriber number should be diallable, at least on some devices. An example of how
+   * this could be used:
    *
+   * <pre>
    * PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance();
    * PhoneNumber number = phoneUtil.parse("16502530000", "US");
-   * String nationalSignificantNumber = PhoneNumberUtil.getNationalSignificantNumber(number);
+   * String nationalSignificantNumber = phoneUtil.getNationalSignificantNumber(number);
    * String areaCode;
    * String subscriberNumber;
    *
@@ -567,10 +595,10 @@ public class PhoneNumberUtil {
    *   areaCode = "";
    *   subscriberNumber = nationalSignificantNumber;
    * }
+   * </pre>
    *
    * N.B.: area code is a very ambiguous concept, so the I18N team generally recommends against
-   * using it for most purposes, but recommends using the more general national_number instead. Read
-   * the following carefully before deciding to use this method:
+   * using it for most purposes. Read the following carefully before deciding to use this method:
    *
    *  - geographical area codes change over time, and this method honors those changes; therefore,
    *    it doesn't guarantee the stability of the result it produces.
@@ -607,12 +635,12 @@ public class PhoneNumberUtil {
    * Gets the length of the national destination code (NDC) from the PhoneNumber object passed in,
    * so that clients could use it to split a national significant number into NDC and subscriber
    * number. The NDC of a phone number is normally the first group of digit(s) right after the
-   * country code when the number is formatted in the international format, if there is a subscriber
-   * number part that follows. An example of how this could be used:
+   * country calling code when the number is formatted in the international format, if there is a
+   * subscriber number part that follows. An example of how this could be used:
    *
    * PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance();
    * PhoneNumber number = phoneUtil.parse("18002530000", "US");
-   * String nationalSignificantNumber = PhoneNumberUtil.getNationalSignificantNumber(number);
+   * String nationalSignificantNumber = phoneUtil.getNationalSignificantNumber(number);
    * String nationalDestinationCode;
    * String subscriberNumber;
    *
@@ -625,9 +653,10 @@ public class PhoneNumberUtil {
    *   nationalDestinationCode = "";
    *   subscriberNumber = nationalSignificantNumber;
    * }
+   * </pre>
    *
    * Refer to the unittests to see the difference between this function and
-   * getLengthOfGeographicalAreaCode().
+   * {@link getLengthOfGeographicalAreaCode()}.
    *
    * @param number  the PhoneNumber object for which clients want to know the length of the NDC.
    * @return  the length of NDC of the PhoneNumber object passed in.
@@ -648,8 +677,8 @@ public class PhoneNumberUtil {
                                               PhoneNumberUtil.PhoneNumberFormat.INTERNATIONAL);
     String[] numberGroups = NON_DIGITS_PATTERN.split(nationalSignificantNumber);
     // The pattern will start with "+COUNTRY_CODE " so the first group will always be the empty
-    // string (before the + symbol) and the second group will be the country code. The third group
-    // will be area code if it is not the last group.
+    // string (before the + symbol) and the second group will be the country calling code. The third
+    // group will be area code if it is not the last group.
     if (numberGroups.length <= 3) {
       return 0;
     }
@@ -699,10 +728,10 @@ public class PhoneNumberUtil {
 
   static synchronized PhoneNumberUtil getInstance(
       String baseFileLocation,
-      Map<Integer, List<String>> countryCodeToRegionCodeMap) {
+      Map<Integer, List<String>> countryCallingCodeToRegionCodeMap) {
     if (instance == null) {
       instance = new PhoneNumberUtil();
-      instance.countryCodeToRegionCodeMap = countryCodeToRegionCodeMap;
+      instance.countryCallingCodeToRegionCodeMap = countryCallingCodeToRegionCodeMap;
       instance.init(baseFileLocation);
     }
     return instance;
@@ -716,20 +745,19 @@ public class PhoneNumberUtil {
   }
 
   /**
-   * Convenience method to enable tests to get a list of what countries the library has metadata
-   * for.
+   * Convenience method to enable tests to get a list of what regions the library has metadata for.
    */
-  public Set<String> getSupportedCountries() {
-    return supportedCountries;
+  public Set<String> getSupportedRegions() {
+    return supportedRegions;
   }
 
   /**
-   * Gets a PhoneNumberUtil instance to carry out international phone number formatting, parsing,
-   * or validation. The instance is loaded with phone number metadata for a number of most commonly
-   * used countries/regions.
+   * Gets a {@link PhoneNumberUtil} instance to carry out international phone number formatting,
+   * parsing, or validation. The instance is loaded with phone number metadata for a number of most
+   * commonly used regions.
    *
-   * The PhoneNumberUtil is implemented as a singleton. Therefore, calling getInstance multiple
-   * times will only result in one instance being created.
+   * <p>The {@link PhoneNumberUtil} is implemented as a singleton. Therefore, calling getInstance
+   * multiple times will only result in one instance being created.
    *
    * @return a PhoneNumberUtil instance
    */
@@ -745,7 +773,23 @@ public class PhoneNumberUtil {
    * Helper function to check region code is not unknown or null.
    */
   private boolean isValidRegionCode(String regionCode) {
-    return regionCode != null && supportedCountries.contains(regionCode.toUpperCase());
+    return regionCode != null && supportedRegions.contains(regionCode.toUpperCase());
+  }
+
+  /**
+   * Helper function to check region code is not unknown or null and log an error message. The
+   * {@code countryCallingCode} and {@code number} supplied is used only for the resultant log
+   * message.
+   */
+  private boolean hasValidRegionCode(String regionCode,
+                                     int countryCallingCode, String number) {
+    if (!isValidRegionCode(regionCode)) {
+      LOGGER.log(Level.WARNING,
+                 "Number " + number + " has invalid or missing country calling code ("
+                 + countryCallingCode + ")");
+      return false;
+    }
+    return true;
   }
 
   /**
@@ -754,8 +798,9 @@ public class PhoneNumberUtil {
    * format in either 'national' or 'international' format depending on what the client asks for, we
    * do not currently support a more abbreviated format, such as for users in the same "area" who
    * could potentially dial the number without area code. Note that if the phone number has a
-   * country code of 0 or an otherwise invalid country code, we cannot work out which formatting
-   * rules to apply so we return the national significant number with no formatting applied.
+   * country calling code of 0 or an otherwise invalid country calling code, we cannot work out
+   * which formatting rules to apply so we return the national significant number with no formatting
+   * applied.
    *
    * @param number         the phone number to be formatted
    * @param numberFormat   the format the phone number should be formatted into
@@ -782,9 +827,9 @@ public class PhoneNumberUtil {
       formatNumberByFormat(countryCode, PhoneNumberFormat.E164, formattedNumber);
       return;
     }
-    // Note getRegionCodeForCountryCode() is used because formatting information for countries which
-    // share a country code is contained by only one country for performance reasons. For example,
-    // for NANPA countries it will be contained in the metadata for US.
+    // Note getRegionCodeForCountryCode() is used because formatting information for regions which
+    // share a country calling code is contained by only one region for performance reasons. For
+    // example, for NANPA regions it will be contained in the metadata for US.
     String regionCode = getRegionCodeForCountryCode(countryCode);
     if (!isValidRegionCode(regionCode)) {
       formattedNumber.append(nationalSignificantNumber);
@@ -793,15 +838,15 @@ public class PhoneNumberUtil {
 
     formattedNumber.append(formatNationalNumber(nationalSignificantNumber,
                                                 regionCode, numberFormat));
-    maybeGetFormattedExtension(number, regionCode, formattedNumber);
+    maybeGetFormattedExtension(number, regionCode, numberFormat, formattedNumber);
     formatNumberByFormat(countryCode, numberFormat, formattedNumber);
   }
 
   /**
    * Formats a phone number in the specified format using client-defined formatting rules. Note that
-   * if the phone number has a country code of zero or an otherwise invalid country code, we cannot
-   * work out things like whether there should be a national prefix applied, or how to format
-   * extensions, so we return the national significant number with no formatting applied.
+   * if the phone number has a country calling code of zero or an otherwise invalid country calling
+   * code, we cannot work out things like whether there should be a national prefix applied, or how
+   * to format extensions, so we return the national significant number with no formatting applied.
    *
    * @param number                        the phone number to be formatted
    * @param numberFormat                  the format the phone number should be formatted into
@@ -811,13 +856,13 @@ public class PhoneNumberUtil {
   public String formatByPattern(PhoneNumber number,
                                 PhoneNumberFormat numberFormat,
                                 List<NumberFormat> userDefinedFormats) {
-    int countryCode = number.getCountryCode();
+    int countryCallingCode = number.getCountryCode();
     String nationalSignificantNumber = getNationalSignificantNumber(number);
-    // Note getRegionCodeForCountryCode() is used because formatting information for countries which
-    // share a country code is contained by only one country for performance reasons. For example,
-    // for NANPA countries it will be contained in the metadata for US.
-    String regionCode = getRegionCodeForCountryCode(countryCode);
-    if (!isValidRegionCode(regionCode)) {
+    // Note getRegionCodeForCountryCode() is used because formatting information for regions which
+    // share a country calling code is contained by only one region for performance reasons. For
+    // example, for NANPA regions it will be contained in the metadata for US.
+    String regionCode = getRegionCodeForCountryCode(countryCallingCode);
+    if (!hasValidRegionCode(regionCode, countryCallingCode, nationalSignificantNumber)) {
       return nationalSignificantNumber;
     }
     List<NumberFormat> userDefinedFormatsCopy =
@@ -853,30 +898,30 @@ public class PhoneNumberUtil {
         new StringBuffer(formatAccordingToFormats(nationalSignificantNumber,
                                                   userDefinedFormatsCopy,
                                                   numberFormat));
-    maybeGetFormattedExtension(number, regionCode, formattedNumber);
-    formatNumberByFormat(countryCode, numberFormat, formattedNumber);
+    maybeGetFormattedExtension(number, regionCode, numberFormat, formattedNumber);
+    formatNumberByFormat(countryCallingCode, numberFormat, formattedNumber);
     return formattedNumber.toString();
   }
 
   /**
    * Formats a phone number in national format for dialing using the carrier as specified in the
-   * carrierCode. The carrierCode will always be used regardless of whether the phone number already
-   * has a preferred domestic carrier code stored. If carrierCode contains an empty string, return
-   * the number in national format without any carrier code.
+   * {@code carrierCode}. The {@code carrierCode} will always be used regardless of whether the
+   * phone number already has a preferred domestic carrier code stored. If {@code carrierCode}
+   * contains an empty string, returns the number in national format without any carrier code.
    * 
    * @param number  the phone number to be formatted
    * @param carrierCode  the carrier selection code to be used
    * @return  the formatted phone number in national format for dialing using the carrier as
-   *          specified in the carrierCode
+   *          specified in the {@code carrierCode}
    */
   public String formatNationalNumberWithCarrierCode(PhoneNumber number, String carrierCode) {
-    int countryCode = number.getCountryCode();
+    int countryCallingCode = number.getCountryCode();
     String nationalSignificantNumber = getNationalSignificantNumber(number);
-    // Note getRegionCodeForCountryCode() is used because formatting information for countries which
-    // share a country code is contained by only one country for performance reasons. For example,
-    // for NANPA countries it will be contained in the metadata for US.
-    String regionCode = getRegionCodeForCountryCode(countryCode);
-    if (!isValidRegionCode(regionCode)) {
+    // Note getRegionCodeForCountryCode() is used because formatting information for regions which
+    // share a country calling code is contained by only one region for performance reasons. For
+    // example, for NANPA regions it will be contained in the metadata for US.
+    String regionCode = getRegionCodeForCountryCode(countryCallingCode);
+    if (!hasValidRegionCode(regionCode, countryCallingCode, nationalSignificantNumber)) {
       return nationalSignificantNumber;
     }
 
@@ -885,26 +930,27 @@ public class PhoneNumberUtil {
                                                 regionCode,
                                                 PhoneNumberFormat.NATIONAL,
                                                 carrierCode));
-    maybeGetFormattedExtension(number, regionCode, formattedNumber);
-    formatNumberByFormat(countryCode, PhoneNumberFormat.NATIONAL, formattedNumber);
+    maybeGetFormattedExtension(number, regionCode, PhoneNumberFormat.NATIONAL, formattedNumber);
+    formatNumberByFormat(countryCallingCode, PhoneNumberFormat.NATIONAL, formattedNumber);
     return formattedNumber.toString();
   }
 
   /**
    * Formats a phone number in national format for dialing using the carrier as specified in the
-   * preferred_domestic_carrier_code field of the PhoneNumber object passed in. If that is missing,
-   * use the fallbackCarrierCode passed in instead. If there is no preferred_domestic_carrier_code,
-   * and the fallbackCarrierCode contains an empty string, return the number in national format
-   * without any carrier code.
+   * preferredDomesticCarrierCode field of the PhoneNumber object passed in. If that is missing,
+   * use the {@code fallbackCarrierCode} passed in instead. If there is no
+   * {@code preferredDomesticCarrierCode}, and the {@code fallbackCarrierCode} contains an empty
+   * string, return the number in national format without any carrier code.
    *
-   * Use formatNationalNumberWithCarrierCode instead if the carrier code passed in should take
-   * precedence over the number's preferred_domestic_carrier_code when formatting.
+   * <p>Use {@link #formatNationalNumberWithCarrierCode} instead if the carrier code passed in
+   * should take precedence over the number's {@code preferredDomesticCarrierCode} when formatting.
    *
    * @param number  the phone number to be formatted
    * @param fallbackCarrierCode  the carrier selection code to be used, if none is found in the
-   *        phone number itself
+   *     phone number itself
    * @return  the formatted phone number in national format for dialing using the number's
-   *          preferred_domestic_carrier_code, or the fallbackCarrierCode passed in if none is found
+   *     {@code preferredDomesticCarrierCode}, or the {@code fallbackCarrierCode} passed in if
+   *     none is found
    */
   public String formatNationalNumberWithPreferredCarrierCode(PhoneNumber number,
                                                              String fallbackCarrierCode) {
@@ -914,56 +960,55 @@ public class PhoneNumberUtil {
   }
 
   /**
-   * Formats a phone number for out-of-country dialing purpose. If no countryCallingFrom
-   * is supplied, we format the number in its INTERNATIONAL format. If the countryCallingFrom is
-   * the same as the country where the number is from, then NATIONAL formatting will be applied.
+   * Formats a phone number for out-of-country dialing purposes. If no countryCallingFrom is
+   * supplied, we format the number in its INTERNATIONAL format. If the country calling code is the
+   * same as the region where the number is from, then NATIONAL formatting will be applied.
    *
-   * If the number itself has a country code of zero or an otherwise invalid country code, then we
-   * return the number with no formatting applied.
+   * <p>If the number itself has a country calling code of zero or an otherwise invalid country
+   * calling code, then we return the number with no formatting applied.
    *
-   * Note this function takes care of the case for calling inside of NANPA and between Russia and
-   * Kazakhstan (who share the same country code). In those cases, no international prefix is used.
-   * For countries which have multiple international prefixes, the number in its INTERNATIONAL
-   * format will be returned instead.
+   * <p>Note this function takes care of the case for calling inside of NANPA and between Russia and
+   * Kazakhstan (who share the same country calling code). In those cases, no international prefix
+   * is used. For regions which have multiple international prefixes, the number in its
+   * INTERNATIONAL format will be returned instead.
    *
    * @param number               the phone number to be formatted
-   * @param countryCallingFrom   the ISO 3166-1 two-letter country code that denotes
-   *                             the foreign country where the call is being placed
+   * @param regionCallingFrom    the ISO 3166-1 two-letter region code that denotes the region
+   *                             where the call is being placed
    * @return  the formatted phone number
    */
-  public String formatOutOfCountryCallingNumber(PhoneNumber number,
-                                                String countryCallingFrom) {
-    if (!isValidRegionCode(countryCallingFrom)) {
+  public String formatOutOfCountryCallingNumber(PhoneNumber number, String regionCallingFrom) {
+    if (!isValidRegionCode(regionCallingFrom)) {
       return format(number, PhoneNumberFormat.INTERNATIONAL);
     }
-    int countryCode = number.getCountryCode();
-    String regionCode = getRegionCodeForCountryCode(countryCode);
+    int countryCallingCode = number.getCountryCode();
+    String regionCode = getRegionCodeForCountryCode(countryCallingCode);
     String nationalSignificantNumber = getNationalSignificantNumber(number);
     if (!isValidRegionCode(regionCode)) {
       return nationalSignificantNumber;
     }
-    if (countryCode == NANPA_COUNTRY_CODE) {
-      if (isNANPACountry(countryCallingFrom)) {
-        // For NANPA countries, return the national format for these countries but prefix it with
-        // the country code.
-        return countryCode + " " + format(number, PhoneNumberFormat.NATIONAL);
+    if (countryCallingCode == NANPA_COUNTRY_CODE) {
+      if (isNANPACountry(regionCallingFrom)) {
+        // For NANPA regions, return the national format for these regions but prefix it with the
+        // country calling code.
+        return countryCallingCode + " " + format(number, PhoneNumberFormat.NATIONAL);
       }
-    } else if (countryCode == getCountryCodeForRegion(countryCallingFrom)) {
-    // For countries that share a country calling code, the country code need not be dialled. This
-    // also applies when dialling within a country, so this if clause covers both these cases.
-    // Technically this is the case for dialling from la Reunion to other overseas departments of
+    } else if (countryCallingCode == getCountryCodeForRegion(regionCallingFrom)) {
+    // For regions that share a country calling code, the country calling code need not be dialled.
+    // This also applies when dialling within a region, so this if clause covers both these cases.
+    // Technically this is the case for dialling from La Reunion to other overseas departments of
     // France (French Guiana, Martinique, Guadeloupe), but not vice versa - so we don't cover this
-    // edge case for now and for those cases return the version including country code.
+    // edge case for now and for those cases return the version including country calling code.
     // Details here: http://www.petitfute.com/voyage/225-info-pratiques-reunion
       return format(number, PhoneNumberFormat.NATIONAL);
     }
     String formattedNationalNumber =
         formatNationalNumber(nationalSignificantNumber,
                              regionCode, PhoneNumberFormat.INTERNATIONAL);
-    PhoneMetadata metadata = getMetadataForRegion(countryCallingFrom);
+    PhoneMetadata metadata = getMetadataForRegion(regionCallingFrom);
     String internationalPrefix = metadata.getInternationalPrefix();
 
-    // For countries that have multiple international prefixes, the international format of the
+    // For regions that have multiple international prefixes, the international format of the
     // number is returned, unless there is a preferred international prefix.
     String internationalPrefixForFormatting = "";
     if (UNIQUE_INTERNATIONAL_PREFIX.matcher(internationalPrefix).matches()) {
@@ -973,12 +1018,13 @@ public class PhoneNumberUtil {
     }
 
     StringBuffer formattedNumber = new StringBuffer(formattedNationalNumber);
-    maybeGetFormattedExtension(number, regionCode, formattedNumber);
+    maybeGetFormattedExtension(number, regionCode, PhoneNumberFormat.INTERNATIONAL,
+                               formattedNumber);
     if (internationalPrefixForFormatting.length() > 0) {
-      formattedNumber.insert(0, " ").insert(0, countryCode).insert(0, " ")
+      formattedNumber.insert(0, " ").insert(0, countryCallingCode).insert(0, " ")
           .insert(0, internationalPrefixForFormatting);
     } else {
-      formatNumberByFormat(countryCode,
+      formatNumberByFormat(countryCallingCode,
                            PhoneNumberFormat.INTERNATIONAL,
                            formattedNumber);
     }
@@ -991,12 +1037,12 @@ public class PhoneNumberUtil {
    * passed in. If such information is missing, the number will be formatted into the NATIONAL
    * format by default.
    *
-   * @param number  the PhoneNumber that needs to be formatted in its original number format
-   * @param countryCallingFrom  the country whose IDD needs to be prefixed if the original number
+   * @param number  the phone number that needs to be formatted in its original number format
+   * @param regionCallingFrom  the region whose IDD needs to be prefixed if the original number
    *     has one
    * @return  the formatted phone number in its original number format
    */
-  public String formatInOriginalFormat(PhoneNumber number, String countryCallingFrom) {
+  public String formatInOriginalFormat(PhoneNumber number, String regionCallingFrom) {
     if (!number.hasCountryCodeSource()) {
       return format(number, PhoneNumberFormat.NATIONAL);
     }
@@ -1004,7 +1050,7 @@ public class PhoneNumberUtil {
       case FROM_NUMBER_WITH_PLUS_SIGN:
         return format(number, PhoneNumberFormat.INTERNATIONAL);
       case FROM_NUMBER_WITH_IDD:
-        return formatOutOfCountryCallingNumber(number, countryCallingFrom);
+        return formatOutOfCountryCallingNumber(number, regionCallingFrom);
       case FROM_NUMBER_WITHOUT_PLUS_SIGN:
         return format(number, PhoneNumberFormat.INTERNATIONAL).substring(1);
       case FROM_DEFAULT_COUNTRY:
@@ -1014,23 +1060,122 @@ public class PhoneNumberUtil {
   }
 
   /**
+   * Formats a phone number for out-of-country dialing purposes.
+   *
+   * Note that in this version, if the number was entered originally using alpha characters and
+   * this version of the number is stored in raw_input, this representation of the number will be
+   * used rather than the digit representation. Grouping information, as specified by characters
+   * such as "-" and " ", will be retained.
+   *
+   * <p><b>Caveats:</b></p>
+   * <ul>
+   *  <li> This will not produce good results if the country calling code is both present in the raw
+   *       input _and_ is the start of the national number. This is not a problem in the regions
+   *       which typically use alpha numbers.
+   *  <li> This will also not produce good results if the raw input has any grouping information
+   *       within the first three digits of the national number, and if the function needs to strip
+   *       preceding digits/words in the raw input before these digits. Normally people group the
+   *       first three digits together so this is not a huge problem - and will be fixed if it
+   *       proves to be so.
+   * </ul>
+   *
+   * @param number  the phone number that needs to be formatted
+   * @param regionCallingFrom  the region where the call is being placed
+   * @return  the formatted phone number
+   */
+  public String formatOutOfCountryKeepingAlphaChars(PhoneNumber number, String regionCallingFrom) {
+    String rawInput = number.getRawInput();
+    // If there is no raw input, then we can't keep alpha characters because there aren't any.
+    // In this case, we return formatOutOfCountryCallingNumber.
+    if (rawInput.length() == 0) {
+      return formatOutOfCountryCallingNumber(number, regionCallingFrom);
+    }
+    int countryCode = number.getCountryCode();
+    String regionCode = getRegionCodeForCountryCode(countryCode);
+    if (!hasValidRegionCode(regionCode, countryCode, rawInput)) {
+      return rawInput;
+    }
+    // Strip any prefix such as country calling code, IDD, that was present. We do this by comparing
+    // the number in raw_input with the parsed number.
+    // To do this, first we normalize punctuation. We retain number grouping symbols such as " "
+    // only.
+    rawInput = normalizeHelper(rawInput, ALL_PLUS_NUMBER_GROUPING_SYMBOLS, true);
+    // Now we trim everything before the first three digits in the parsed number. We choose three
+    // because all valid alpha numbers have 3 digits at the start - if it does not, then we don't
+    // trim anything at all. Similarly, if the national number was less than three digits, we don't
+    // trim anything at all.
+    String nationalNumber = getNationalSignificantNumber(number);
+    if (nationalNumber.length() > 3) {
+      int firstNationalNumberDigit = rawInput.indexOf(nationalNumber.substring(0, 3));
+      if (firstNationalNumberDigit != -1) {
+        rawInput = rawInput.substring(firstNationalNumberDigit);
+      }
+    }
+    PhoneMetadata metadata = getMetadataForRegion(regionCallingFrom);
+    if (countryCode == NANPA_COUNTRY_CODE) {
+      if (isNANPACountry(regionCallingFrom)) {
+        return countryCode + " " + rawInput;
+      }
+    } else if (countryCode == getCountryCodeForRegion(regionCallingFrom)) {
+      // Here we copy the formatting rules so we can modify the pattern we expect to match against.
+      List<NumberFormat> availableFormats =
+          new ArrayList<NumberFormat>(metadata.numberFormatSize());
+      for (NumberFormat format : metadata.numberFormats()) {
+        NumberFormat newFormat = new NumberFormat();
+        newFormat.mergeFrom(format);
+        // The first group is the first group of digits that the user determined.
+        newFormat.setPattern("(\\d+)(.*)");
+        // Here we just concatenate them back together after the national prefix has been fixed.
+        newFormat.setFormat("$1$2");
+        availableFormats.add(newFormat);
+      }
+      // Now we format using these patterns instead of the default pattern, but with the national
+      // prefix prefixed if necessary, by choosing the format rule based on the leading digits
+      // present in the unformatted national number.
+      // This will not work in the cases where the pattern (and not the leading digits) decide
+      // whether a national prefix needs to be used, since we have overridden the pattern to match
+      // anything, but that is not the case in the metadata to date.
+      return formatAccordingToFormats(rawInput, availableFormats, PhoneNumberFormat.NATIONAL);
+    }
+    String internationalPrefix = metadata.getInternationalPrefix();
+    // For countries that have multiple international prefixes, the international format of the
+    // number is returned, unless there is a preferred international prefix.
+    String internationalPrefixForFormatting =
+        UNIQUE_INTERNATIONAL_PREFIX.matcher(internationalPrefix).matches()
+        ? internationalPrefix
+        : metadata.getPreferredInternationalPrefix();
+    StringBuffer formattedNumber = new StringBuffer(rawInput);
+    maybeGetFormattedExtension(number, regionCode, PhoneNumberFormat.INTERNATIONAL,
+                               formattedNumber);
+    if (internationalPrefixForFormatting.length() > 0) {
+      formattedNumber.insert(0, " ").insert(0, countryCode).insert(0, " ")
+          .insert(0, internationalPrefixForFormatting);
+    } else {
+      formatNumberByFormat(countryCode,
+                           PhoneNumberFormat.INTERNATIONAL,
+                           formattedNumber);
+    }
+    return formattedNumber.toString();
+  }
+
+  /**
    * Gets the national significant number of the a phone number. Note a national significant number
    * doesn't contain a national prefix or any formatting.
    *
    * @param number  the PhoneNumber object for which the national significant number is needed
    * @return  the national significant number of the PhoneNumber object passed in
    */
-  public static String getNationalSignificantNumber(PhoneNumber number) {
+  public String getNationalSignificantNumber(PhoneNumber number) {
     // The leading zero in the national (significant) number of an Italian phone number has a
     // special meaning. Unlike the rest of the world, it indicates the number is a landline
     // number. There have been plans to migrate landline numbers to start with the digit two since
     // December 2000, but it has not yet happened.
     // See http://en.wikipedia.org/wiki/%2B39 for more details.
-    // Other countries such as Cote d'Ivoire and Gabon use this for their mobile numbers.
+    // Other regions such as Cote d'Ivoire and Gabon use this for their mobile numbers.
     StringBuffer nationalNumber = new StringBuffer(
         (number.hasItalianLeadingZero() &&
          number.getItalianLeadingZero() &&
-         isLeadingZeroCountry(number.getCountryCode()))
+         isLeadingZeroPossible(number.getCountryCode()))
         ? "0" : ""
     );
     nationalNumber.append(number.getNationalNumber());
@@ -1040,15 +1185,18 @@ public class PhoneNumberUtil {
   /**
    * A helper function that is used by format and formatByPattern.
    */
-  private void formatNumberByFormat(int countryCode,
+  private void formatNumberByFormat(int countryCallingCode,
                                     PhoneNumberFormat numberFormat,
                                     StringBuffer formattedNumber) {
     switch (numberFormat) {
       case E164:
-        formattedNumber.insert(0, countryCode).insert(0, PLUS_SIGN);
+        formattedNumber.insert(0, countryCallingCode).insert(0, PLUS_SIGN);
         return;
       case INTERNATIONAL:
-        formattedNumber.insert(0, " ").insert(0, countryCode).insert(0, PLUS_SIGN);
+        formattedNumber.insert(0, " ").insert(0, countryCallingCode).insert(0, PLUS_SIGN);
+        return;
+      case RFC3966:
+        formattedNumber.insert(0, "-").insert(0, countryCallingCode) .insert(0, PLUS_SIGN);
         return;
       case NATIONAL:
       default:
@@ -1063,7 +1211,7 @@ public class PhoneNumberUtil {
     return formatNationalNumber(number, regionCode, numberFormat, null);
   }
 
-  // Note in some countries, the national number can be written in two completely different ways
+  // Note in some regions, the national number can be written in two completely different ways
   // depending on whether it forms part of the NATIONAL format or INTERNATIONAL format. The
   // numberFormat parameter here is used to specify which format to use for those cases. If a
   // carrierCode is specified, this will be inserted into the formatted string to replace $CC.
@@ -1072,14 +1220,20 @@ public class PhoneNumberUtil {
                                       PhoneNumberFormat numberFormat,
                                       String carrierCode) {
     PhoneMetadata metadata = getMetadataForRegion(regionCode);
-    List<NumberFormat> intlNumberFormats = metadata.getIntlNumberFormatList();
+    List<NumberFormat> intlNumberFormats = metadata.intlNumberFormats();
     // When the intlNumberFormats exists, we use that to format national number for the
     // INTERNATIONAL format instead of using the numberDesc.numberFormats.
     List<NumberFormat> availableFormats =
         (intlNumberFormats.size() == 0 || numberFormat == PhoneNumberFormat.NATIONAL)
-        ? metadata.getNumberFormatList()
-        : metadata.getIntlNumberFormatList();
-    return formatAccordingToFormats(number, availableFormats, numberFormat, carrierCode);
+        ? metadata.numberFormats()
+        : metadata.intlNumberFormats();
+    String formattedNationalNumber =
+        formatAccordingToFormats(number, availableFormats, numberFormat, carrierCode);
+    if (numberFormat == PhoneNumberFormat.RFC3966) {
+      formattedNationalNumber =
+          SEPARATOR_PATTERN.matcher(formattedNationalNumber).replaceAll("-");
+    }
+    return formattedNationalNumber;
   }
 
   // Simple wrapper of formatAccordingToFormats for the common case of no carrier code.
@@ -1096,7 +1250,7 @@ public class PhoneNumberUtil {
                                           PhoneNumberFormat numberFormat,
                                           String carrierCode) {
     for (NumberFormat numFormat : availableFormats) {
-      int size = numFormat.getLeadingDigitsPatternCount();
+      int size = numFormat.leadingDigitsPatternSize();
       if (size == 0 || regexCache.getPatternForRegex(
               // We always use the last leading_digits_pattern, as it is the most detailed.
               numFormat.getLeadingDigitsPattern(size - 1)).matcher(nationalNumber).lookingAt()) {
@@ -1136,11 +1290,11 @@ public class PhoneNumberUtil {
   }
 
   /**
-   * Gets a valid number for the specified country.
+   * Gets a valid number for the specified region.
    *
-   * @param regionCode  the ISO 3166-1 two-letter country code that denotes
-   *                    the country for which an example number is needed
-   * @return  a valid fixed-line number for the specified country. Returns null when the metadata
+   * @param regionCode  the ISO 3166-1 two-letter region code that denotes
+   *                    the region for which an example number is needed
+   * @return  a valid fixed-line number for the specified region. Returns null when the metadata
    *    does not contain such information.
    */
   public PhoneNumber getExampleNumber(String regionCode) {
@@ -1148,12 +1302,12 @@ public class PhoneNumberUtil {
   }
 
   /**
-   * Gets a valid number for the specified country and number type.
+   * Gets a valid number for the specified region and number type.
    *
-   * @param regionCode  the ISO 3166-1 two-letter country code that denotes
-   *                    the country for which an example number is needed
+   * @param regionCode  the ISO 3166-1 two-letter region code that denotes
+   *                    the region for which an example number is needed
    * @param type  the type of number that is needed
-   * @return  a valid number for the specified country and type. Returns null when the metadata
+   * @return  a valid number for the specified region and type. Returns null when the metadata
    *     does not contain such information.
    */
   public PhoneNumber getExampleNumberForType(String regionCode, PhoneNumberType type) {
@@ -1173,18 +1327,28 @@ public class PhoneNumberUtil {
    * an extension specified.
    */
   private void maybeGetFormattedExtension(PhoneNumber number, String regionCode,
+                                          PhoneNumberFormat numberFormat,
                                           StringBuffer formattedNumber) {
-    if (number.hasExtension()) {
-      // Formats the extension part of the phone number by prefixing it with the appropriate
-      // extension prefix. This will be the default extension prefix, unless overridden by a
-      // preferred extension prefix for this country.
-      PhoneMetadata metadata = getMetadataForRegion(regionCode);
-      if (metadata.hasPreferredExtnPrefix()) {
-        formattedNumber.append(metadata.getPreferredExtnPrefix());
+    if (number.hasExtension() && number.getExtension().length() > 0) {
+      if (numberFormat == PhoneNumberFormat.RFC3966) {
+        formattedNumber.append(RFC3966_EXTN_PREFIX).append(number.getExtension());
       } else {
-        formattedNumber.append(DEFAULT_EXTN_PREFIX);
+        formatExtension(number.getExtension(), regionCode, formattedNumber);
       }
-      formattedNumber.append(number.getExtension());
+    }
+  }
+
+  /**
+   * Formats the extension part of the phone number by prefixing it with the appropriate extension
+   * prefix. This will be the default extension prefix, unless overridden by a preferred
+   * extension prefix for this region.
+   */
+  private void formatExtension(String extensionDigits, String regionCode, StringBuffer extension) {
+    PhoneMetadata metadata = getMetadataForRegion(regionCode);
+    if (metadata.hasPreferredExtnPrefix()) {
+      extension.append(metadata.getPreferredExtnPrefix()).append(extensionDigits);
+    } else {
+      extension.append(DEFAULT_EXTN_PREFIX).append(extensionDigits);
     }
   }
 
@@ -1281,10 +1445,10 @@ public class PhoneNumberUtil {
       return null;
     }
     regionCode = regionCode.toUpperCase();
-    if (!countryToMetadataMap.containsKey(regionCode)) {
+    if (!regionToMetadataMap.containsKey(regionCode)) {
       loadMetadataForRegionFromFile(currentFilePrefix, regionCode);
     }
-    return countryToMetadataMap.get(regionCode);
+    return regionToMetadataMap.get(regionCode);
   }
 
   private boolean isNumberMatchingDesc(String nationalNumber, PhoneNumberDesc numberDesc) {
@@ -1312,14 +1476,14 @@ public class PhoneNumberUtil {
   /**
    * Tests whether a phone number is valid for a certain region. Note this doesn't verify the number
    * is actually in use, which is impossible to tell by just looking at a number itself. If the
-   * country code is not the same as the country code for the region, this immediately exits with
-   * false. After this, the specific number pattern rules for the region are examined. This is
-   * useful for determining for example whether a particular number is valid for Canada, rather than
-   * just a valid NANPA number.
+   * country calling code is not the same as the country calling code for the region, this
+   * immediately exits with false. After this, the specific number pattern rules for the region are
+   * examined. This is useful for determining for example whether a particular number is valid for
+   * Canada, rather than just a valid NANPA number.
    *
    * @param number       the phone number that we want to validate
-   * @param regionCode   the ISO 3166-1 two-letter country code that denotes
-   *                     the region/country that we want to validate the phone number for
+   * @param regionCode   the ISO 3166-1 two-letter region code that denotes the region that we want
+   *                     to validate the phone number for
    * @return  a boolean that indicates whether the number is of a valid pattern
    */
   public boolean isValidNumberForRegion(PhoneNumber number, String regionCode) {
@@ -1330,8 +1494,8 @@ public class PhoneNumberUtil {
     PhoneNumberDesc generalNumDesc = metadata.getGeneralDesc();
     String nationalSignificantNumber = getNationalSignificantNumber(number);
 
-    // For countries where we don't have metadata for PhoneNumberDesc, we treat any number passed
-    // in as a valid number if its national significant number is between the minimum and maximum
+    // For regions where we don't have metadata for PhoneNumberDesc, we treat any number passed in
+    // as a valid number if its national significant number is between the minimum and maximum
     // lengths defined by ITU for a national significant number.
     if (!generalNumDesc.hasNationalNumberPattern()) {
       int numberLength = nationalSignificantNumber.length();
@@ -1341,16 +1505,16 @@ public class PhoneNumberUtil {
   }
 
   /**
-   * Returns the country/region where a phone number is from. This could be used for geo-coding in
-   * the country/region level.
+   * Returns the region where a phone number is from. This could be used for geocoding at the region
+   * level.
    *
    * @param number  the phone number whose origin we want to know
-   * @return  the country/region where the phone number is from, or null if no country matches this
-   *     calling code.
+   * @return  the region where the phone number is from, or null if no region matches this calling
+   *     code
    */
   public String getRegionCodeForNumber(PhoneNumber number) {
     int countryCode = number.getCountryCode();
-    List<String> regions = countryCodeToRegionCodeMap.get(countryCode);
+    List<String> regions = countryCallingCodeToRegionCodeMap.get(countryCode);
     if (regions == null) {
       return null;
     }
@@ -1380,12 +1544,12 @@ public class PhoneNumberUtil {
   }
 
   /**
-   * Returns the region code that matches the specific country code. In the case of no region code
-   * being found, ZZ will be returned. In the case of multiple regions, the one designated in the
-   * metadata as the "main" country for this calling code will be returned.
+   * Returns the region code that matches the specific country calling code. In the case of no
+   * region code being found, ZZ will be returned. In the case of multiple regions, the one
+   * designated in the metadata as the "main" region for this calling code will be returned.
    */
-  public String getRegionCodeForCountryCode(int countryCode) {
-    List<String> regionCodes = countryCodeToRegionCodeMap.get(countryCode);
+  public String getRegionCodeForCountryCode(int countryCallingCode) {
+    List<String> regionCodes = countryCallingCodeToRegionCodeMap.get(countryCallingCode);
     return regionCodes == null ? UNKNOWN_REGION : regionCodes.get(0);
   }
 
@@ -1393,9 +1557,9 @@ public class PhoneNumberUtil {
    * Returns the country calling code for a specific region. For example, this would be 1 for the
    * United States, and 64 for New Zealand.
    *
-   * @param regionCode  the ISO 3166-1 two-letter country code that denotes
-   *                    the country/region that we want to get the country code for
-   * @return  the country calling code for the country/region denoted by regionCode
+   * @param regionCode  the ISO 3166-1 two-letter region code that denotes
+   *                    the region that we want to get the country calling code for
+   * @return  the country calling code for the region denoted by regionCode
    */
   public int getCountryCodeForRegion(String regionCode) {
     if (!isValidRegionCode(regionCode)) {
@@ -1414,23 +1578,23 @@ public class PhoneNumberUtil {
    * (which indicates a wait for a dialling tone) from the prefix returned. If no national prefix is
    * present, we return null.
    *
-   * Warning: Do not use this method for do-your-own formatting - for some countries, the national
-   * dialling prefix is used only for certain types of numbers. Use the library's formatting
-   * functions to prefix the national prefix when required.
+   * <p>Warning: Do not use this method for do-your-own formatting - for some regions, the
+   * national dialling prefix is used only for certain types of numbers. Use the library's
+   * formatting functions to prefix the national prefix when required.
    *
-   * @param regionCode  the ISO 3166-1 two-letter country code that denotes
-   *                    the country/region that we want to get the dialling prefix for
+   * @param regionCode  the ISO 3166-1 two-letter region code that denotes
+   *                    the region that we want to get the dialling prefix for
    * @param stripNonDigits  true to strip non-digits from the national dialling prefix
-   * @return  the dialling prefix for the country/region denoted by regionCode
+   * @return  the dialling prefix for the region denoted by regionCode
    */
   public String getNddPrefixForRegion(String regionCode, boolean stripNonDigits) {
     if (!isValidRegionCode(regionCode)) {
-      LOGGER.log(Level.SEVERE, "Invalid or missing country code provided.");
+      LOGGER.log(Level.SEVERE, "Invalid or missing region code provided.");
       return null;
     }
     PhoneMetadata metadata = getMetadataForRegion(regionCode);
     if (metadata == null) {
-      LOGGER.log(Level.SEVERE, "Unsupported country code provided.");
+      LOGGER.log(Level.SEVERE, "Unsupported region code provided.");
       return null;
     }
     String nationalPrefix = metadata.getNationalPrefix();
@@ -1447,26 +1611,51 @@ public class PhoneNumberUtil {
   }
 
   /**
-   * Check if a country is one of the countries under the North American Numbering Plan
-   * Administration (NANPA).
+   * Checks if this is a region under the North American Numbering Plan Administration (NANPA).
    *
-   * @return  true if regionCode is one of the countries under NANPA
+   * @return  true if regionCode is one of the regions under NANPA
    */
   public boolean isNANPACountry(String regionCode) {
-    return regionCode != null && nanpaCountries.contains(regionCode.toUpperCase());
+    return regionCode != null && nanpaRegions.contains(regionCode.toUpperCase());
   }
 
   /**
-   * Check whether countryCode represents the country calling code from a country whose national
-   * significant number could contain a leading zero. An example of such a country is Italy.
+   * Checks whether countryCode represents the country calling code from a region whose national
+   * significant number could contain a leading zero. An example of such a region is Italy. Returns
+   * false if no metadata for the country is found.
+   */
+   boolean isLeadingZeroPossible(int countryCallingCode) {
+     PhoneMetadata mainMetadataForCallingCode = getMetadataForRegion(
+         getRegionCodeForCountryCode(countryCallingCode));
+     if (mainMetadataForCallingCode == null) {
+       return false;
+     }
+     return mainMetadataForCallingCode.isLeadingZeroPossible();
+   }
+
+  /**
+   * Checks if the number is a valid vanity (alpha) number such as 800 MICROSOFT. A valid vanity
+   * number will start with at least 3 digits and will have three or more alpha characters. This
+   * does not do region-specific checks - to work out if this number is actually valid for a region,
+   * it should be parsed and methods such as {@link #isPossibleNumberWithReason} and
+   * {@link #isValidNumber} should be used.
+   *
+   * @param number  the number that needs to be checked
+   * @return  true if the number is a valid vanity number
    */
-  public static boolean isLeadingZeroCountry(int countryCode) {
-    return LEADING_ZERO_COUNTRIES.contains(countryCode);
+  public boolean isAlphaNumber(String number) {
+    if (!isViablePhoneNumber(number)) {
+      // Number is too short, or doesn't match the basic phone number pattern.
+      return false;
+    }
+    StringBuffer strippedNumber = new StringBuffer(number);
+    maybeStripExtension(strippedNumber);
+    return VALID_ALPHA_PHONE_PATTERN.matcher(strippedNumber).matches();
   }
 
   /**
-   * Convenience wrapper around isPossibleNumberWithReason. Instead of returning the reason for
-   * failure, this method returns a boolean value.
+   * Convenience wrapper around {@link #isPossibleNumberWithReason}. Instead of returning the reason
+   * for failure, this method returns a boolean value.
    * @param number  the number that needs to be checked
    * @return  true if the number is possible
    */
@@ -1476,13 +1665,14 @@ public class PhoneNumberUtil {
 
   /**
    * Check whether a phone number is a possible number. It provides a more lenient check than
-   * isValidNumber in the following sense:
-   *   1. It only checks the length of phone numbers. In particular, it doesn't check starting
+   * {@link #isValidNumber} in the following sense:
+   *<ol>
+   * <li> It only checks the length of phone numbers. In particular, it doesn't check starting
    *      digits of the number.
-   *   2. It doesn't attempt to figure out the type of the number, but uses general rules which
-   *      applies to all types of phone numbers in a country. Therefore, it is much faster than
+   * <li> It doesn't attempt to figure out the type of the number, but uses general rules which
+   *      applies to all types of phone numbers in a region. Therefore, it is much faster than
    *      isValidNumber.
-   *   3. For fixed line numbers, many countries have the concept of area code, which together with
+   * <li> For fixed line numbers, many regions have the concept of area code, which together with
    *      subscriber number constitute the national significant number. It is sometimes okay to dial
    *      the subscriber number only when dialing in the same area. This function will return
    *      true if the subscriber-number-only version is passed in. On the other hand, because
@@ -1490,21 +1680,21 @@ public class PhoneNumberUtil {
    *      numbers, that would most likely be area codes) and length (obviously includes the
    *      length of area codes for fixed line numbers), it will return false for the
    *      subscriber-number-only version.
-   *
+   * </ol
    * @param number  the number that needs to be checked
    * @return  a ValidationResult object which indicates whether the number is possible
    */
   public ValidationResult isPossibleNumberWithReason(PhoneNumber number) {
+    String nationalNumber = getNationalSignificantNumber(number);
     int countryCode = number.getCountryCode();
     // Note: For Russian Fed and NANPA numbers, we just use the rules from the default region (US or
     // Russia) since the getRegionCodeForNumber will not work if the number is possible but not
     // valid. This would need to be revisited if the possible number pattern ever differed between
-    // various countries within those plans.
+    // various regions within those plans.
     String regionCode = getRegionCodeForCountryCode(countryCode);
     if (!isValidRegionCode(regionCode)) {
       return ValidationResult.INVALID_COUNTRY_CODE;
     }
-    String nationalNumber = getNationalSignificantNumber(number);
     PhoneNumberDesc generalNumDesc = getMetadataForRegion(regionCode).getGeneralDesc();
     // Handling case of numbers with no metadata.
     if (!generalNumDesc.hasNationalNumberPattern()) {
@@ -1530,27 +1720,27 @@ public class PhoneNumberUtil {
 
   /**
    * Check whether a phone number is a possible number given a number in the form of a string, and
-   * the country where the number could be dialed from. It provides a more lenient check than
-   * isValidNumber. See isPossibleNumber(PhoneNumber number) for details.
+   * the region where the number could be dialed from. It provides a more lenient check than
+   * {@link #isValidNumber}. See {@link #isPossibleNumber(PhoneNumber)} for details.
    *
-   * This method first parses the number, then invokes isPossibleNumber(PhoneNumber number) with the
-   * resultant PhoneNumber object.
+   * <p>This method first parses the number, then invokes {@link #isPossibleNumber(PhoneNumber
+   * number)} with the resultant PhoneNumber object.
    *
    * @param number  the number that needs to be checked, in the form of a string
-   * @param countryDialingFrom  the ISO 3166-1 two-letter country code that denotes
-   *     the country that we are expecting the number to be dialed from.
-   *     Note this is different from the country where the number belongs. For example, the number
+   * @param regionDialingFrom  the ISO 3166-1 two-letter region code that denotes the region that
+   *     we are expecting the number to be dialed from.
+   *     Note this is different from the region where the number belongs. For example, the number
    *     +1 650 253 0000 is a number that belongs to US. When written in this form, it could be
-   *     dialed from any country. When it is written as 00 1 650 253 0000, it could be dialed from
-   *     any country which uses an international dialling prefix of 00. When it is written as 650
+   *     dialed from any region. When it is written as 00 1 650 253 0000, it could be dialed from
+   *     any region which uses an international dialling prefix of 00. When it is written as 650
    *     253 0000, it could only be dialed from within the US, and when written as 253 0000, it
    *     could only be dialed from within a smaller area in the US (Mountain View, CA, to be more
    *     specific).
    * @return  true if the number is possible
    */
-  public boolean isPossibleNumber(String number, String countryDialingFrom) {
+  public boolean isPossibleNumber(String number, String regionDialingFrom) {
     try {
-      return isPossibleNumber(parse(number, countryDialingFrom));
+      return isPossibleNumber(parse(number, regionDialingFrom));
     } catch (NumberParseException e) {
       return false;
     }
@@ -1583,27 +1773,28 @@ public class PhoneNumberUtil {
   }
 
   /**
-   * Gets an AsYouTypeFormatter for the specific country.
+   * Gets an {@link com.google.i18n.phonenumbers.AsYouTypeFormatter} for the specific region.
    *
-   * @param regionCode  the ISO 3166-1 two-letter country code that denotes the
-   *     country/region where the phone number is being entered
+   * @param regionCode  the ISO 3166-1 two-letter region code that denotes the region where
+   *     the phone number is being entered
    *
-   * @return  an AsYouTypeFormatter object, which could be used to format phone numbers in the
-   *     specific country "as you type"
+   * @return  an {@link com.google.i18n.phonenumbers.AsYouTypeFormatter} object, which could be used
+   *     to format phone numbers in the specific region "as you type"
    */
   public AsYouTypeFormatter getAsYouTypeFormatter(String regionCode) {
     return new AsYouTypeFormatter(regionCode);
   }
 
-  // Extracts country code from fullNumber, returns it and places the remaining number in
+  // Extracts country calling code from fullNumber, returns it and places the remaining number in
   // nationalNumber. It assumes that the leading plus sign or IDD has already been removed. Returns
-  // 0 if fullNumber doesn't start with a valid country code, and leaves nationalNumber unmodified.
+  // 0 if fullNumber doesn't start with a valid country calling code, and leaves nationalNumber
+  // unmodified.
   int extractCountryCode(StringBuffer fullNumber, StringBuffer nationalNumber) {
     int potentialCountryCode;
     int numberLength = fullNumber.length();
     for (int i = 1; i <= MAX_LENGTH_COUNTRY_CODE && i <= numberLength; i++) {
       potentialCountryCode = Integer.parseInt(fullNumber.substring(0, i));
-      if (countryCodeToRegionCodeMap.containsKey(potentialCountryCode)) {
+      if (countryCallingCodeToRegionCodeMap.containsKey(potentialCountryCode)) {
         nationalNumber.append(fullNumber.substring(i));
         return potentialCountryCode;
       }
@@ -1612,32 +1803,35 @@ public class PhoneNumberUtil {
   }
 
   /**
-   * Tries to extract a country code from a number. This method will return zero if no country code
-   * is considered to be present. Country codes are extracted in the following ways:
-   *     - by stripping the international dialing prefix of the country the person is dialing from,
+   * Tries to extract a country calling code from a number. This method will return zero if no
+   * country calling code is considered to be present. Country calling codes are extracted in the
+   * following ways:
+   * <ul>
+   *  <li> by stripping the international dialing prefix of the region the person is dialing from,
    *       if this is present in the number, and looking at the next digits
-   *     - by stripping the '+' sign if present and then looking at the next digits
-   *     - by comparing the start of the number and the country code of the default region. If the
-   *       number is not considered possible for the numbering plan of the default region initially,
-   *       but starts with the country code of this region, validation will be reattempted after
-   *       stripping this country code. If this number is considered a possible number, then the
-   *       first digits will be considered the country code and removed as such.
-   *
-   * It will throw a NumberParseException if the number starts with a '+' but the country code
-   * supplied after this does not match that of any known country.
+   *  <li> by stripping the '+' sign if present and then looking at the next digits
+   *  <li> by comparing the start of the number and the country calling code of the default region.
+   *       If the number is not considered possible for the numbering plan of the default region
+   *       initially, but starts with the country calling code of this region, validation will be
+   *       reattempted after stripping this country calling code. If this number is considered a
+   *       possible number, then the first digits will be considered the country calling code and
+   *       removed as such.
+   * </ul>
+   * It will throw a NumberParseException if the number starts with a '+' but the country calling
+   * code supplied after this does not match that of any known region.
    *
-   * @param number  non-normalized telephone number that we wish to extract a country
+   * @param number  non-normalized telephone number that we wish to extract a country calling
    *     code from - may begin with '+'
    * @param defaultRegionMetadata  metadata about the region this number may be from
    * @param nationalNumber  a string buffer to store the national significant number in, in the case
-   *     that a country code was extracted. The number is appended to any existing contents. If no
-   *     country code was extracted, this will be left unchanged.
+   *     that a country calling code was extracted. The number is appended to any existing contents.
+   *     If no country calling code was extracted, this will be left unchanged.
    * @param keepRawInput  true if the country_code_source and preferred_carrier_code fields of
    *     phoneNumber should be populated.
-   * @param phoneNumber  the PhoneNumber object that needs to be populated with country code and
-   *     country code source. Note the country code is always populated, whereas country code source
-   *     is only populated when keepCountryCodeSource is true.
-   * @return  the country code extracted or 0 if none could be extracted
+   * @param phoneNumber  the PhoneNumber object where the country_code and country_code_source need
+   *     to be populated. Note the country_code is always populated, whereas country_code_source is
+   *     only populated when keepCountryCodeSource is true.
+   * @return  the country calling code extracted or 0 if none could be extracted
    */
   int maybeExtractCountryCode(String number, PhoneMetadata defaultRegionMetadata,
                               StringBuffer nationalNumber, boolean keepRawInput,
@@ -1670,13 +1864,14 @@ public class PhoneNumberUtil {
         return potentialCountryCode;
       }
 
-      // If this fails, they must be using a strange country code that we don't recognize, or
-      // that doesn't exist.
+      // If this fails, they must be using a strange country calling code that we don't recognize,
+      // or that doesn't exist.
       throw new NumberParseException(NumberParseException.ErrorType.INVALID_COUNTRY_CODE,
-                                     "Country code supplied was not recognised.");
+                                     "Country calling code supplied was not recognised.");
     } else if (defaultRegionMetadata != null) {
       // Check to see if the number is valid for the default region already. If not, we check to
-      // see if the country code for the default region is present at the start of the number.
+      // see if the country calling code for the default region is present at the start of the
+      // number.
       PhoneNumberDesc generalDesc = defaultRegionMetadata.getGeneralDesc();
       Pattern validNumberPattern =
           regexCache.getPatternForRegex(generalDesc.getNationalNumberPattern());
@@ -1692,8 +1887,9 @@ public class PhoneNumberUtil {
           Matcher possibleNumberMatcher =
               regexCache.getPatternForRegex(generalDesc.getPossibleNumberPattern()).matcher(
                   potentialNationalNumber);
-          // If the resultant number is either valid, or still too long even with the country code
-          // stripped, we consider this a better result and keep the potential national number.
+          // If the resultant number is either valid, or still too long even with the country
+          // calling code stripped, we consider this a better result and keep the potential national
+          // number.
           if (validNumberPattern.matcher(potentialNationalNumber).matches() ||
               (possibleNumberMatcher.lookingAt() &&
                possibleNumberMatcher.end() != potentialNationalNumber.length())) {
@@ -1707,7 +1903,7 @@ public class PhoneNumberUtil {
         }
       }
     }
-    // No country code present.
+    // No country calling code present.
     phoneNumber.setCountryCode(0);
     return 0;
   }
@@ -1720,8 +1916,8 @@ public class PhoneNumberUtil {
     Matcher m = iddPattern.matcher(number);
     if (m.lookingAt()) {
       int matchEnd = m.end();
-      // Only strip this if the first digit after the match is not a 0, since country codes cannot
-      // begin with 0.
+      // Only strip this if the first digit after the match is not a 0, since country calling codes
+      // cannot begin with 0.
       Matcher digitMatcher = CAPTURING_DIGIT_PATTERN.matcher(number.substring(matchEnd));
       if (digitMatcher.find()) {
         String normalizedGroup = normalizeHelper(digitMatcher.group(1), DIGIT_MAPPINGS, true);
@@ -1741,7 +1937,7 @@ public class PhoneNumberUtil {
    *
    * @param number  the non-normalized telephone number that we wish to strip any international
    *     dialing prefix from.
-   * @param possibleIddPrefix  the international direct dialing prefix from the country we
+   * @param possibleIddPrefix  the international direct dialing prefix from the region we
    *     think this number may be dialed in
    * @return  the corresponding CountryCodeSource if an international dialing prefix could be
    *          removed from the number, otherwise CountryCodeSource.FROM_DEFAULT_COUNTRY if the
@@ -1781,7 +1977,7 @@ public class PhoneNumberUtil {
    *
    * @param number  the normalized telephone number that we wish to strip any national
    *     dialing prefix from
-   * @param metadata  the metadata for the country that we think this number is from
+   * @param metadata  the metadata for the region that we think this number is from
    * @return the carrier code extracted if it is present, otherwise return an empty string.
    */
   String maybeStripNationalPrefixAndCarrierCode(StringBuffer number, PhoneMetadata metadata) {
@@ -1859,12 +2055,12 @@ public class PhoneNumberUtil {
 
   /**
    * Checks to see that the region code used is valid, or if it is not valid, that the number to
-   * parse starts with a + symbol so that we can attempt to infer the country from the number.
+   * parse starts with a + symbol so that we can attempt to infer the region from the number.
    * Returns false if it cannot use the region provided and the region cannot be inferred.
    */
-  private boolean checkRegionForParsing(String numberToParse, String defaultCountry) {
-    if (!isValidRegionCode(defaultCountry)) {
-      // If the number is null or empty, we can't guess the country code.
+  private boolean checkRegionForParsing(String numberToParse, String defaultRegion) {
+    if (!isValidRegionCode(defaultRegion)) {
+      // If the number is null or empty, we can't infer the region.
       if (numberToParse == null || numberToParse.length() == 0 ||
           !PLUS_CHARS_PATTERN.matcher(numberToParse).lookingAt()) {
         return false;
@@ -1875,95 +2071,95 @@ public class PhoneNumberUtil {
 
   /**
    * Parses a string and returns it in proto buffer format. This method will throw a
-   * NumberParseException exception if the number is not considered to be a possible number. Note
-   * that validation of whether the number is actually a valid number for a particular
-   * country/region is not performed. This can be done separately with isValidNumber.
+   * {@link com.google.i18n.phonenumbers.NumberParseException} if the number is not considered to be
+   * a possible number. Note that validation of whether the number is actually a valid number for a
+   * particular region is not performed. This can be done separately with {@link #isValidNumber}.
    *
    * @param numberToParse     number that we are attempting to parse. This can contain formatting
    *                          such as +, ( and -, as well as a phone number extension.
-   * @param defaultCountry    the ISO 3166-1 two-letter country code that denotes the
-   *                          country that we are expecting the number to be from. This is only used
-   *                          if the number being parsed is not written in international format.
-   *                          The country code for the number in this case would be stored as that
-   *                          of the default country supplied. If the number is guaranteed to
-   *                          start with a '+' followed by the country code, then "ZZ" or
+   * @param defaultRegion     the ISO 3166-1 two-letter region code that denotes the region that we
+   *                          are expecting the number to be from. This is only used if the number
+   *                          being parsed is not written in international format.
+   *                          The country_code for the number in this case would be stored as that
+   *                          of the default region supplied. If the number is guaranteed to
+   *                          start with a '+' followed by the country calling code, then "ZZ" or
    *                          null can be supplied.
    * @return                  a phone number proto buffer filled with the parsed number
    * @throws NumberParseException  if the string is not considered to be a viable phone number or if
-   *                               no default country was supplied and the number is not in
+   *                               no default region was supplied and the number is not in
    *                               international format (does not start with +)
    */
-  public PhoneNumber parse(String numberToParse, String defaultCountry)
+  public PhoneNumber parse(String numberToParse, String defaultRegion)
       throws NumberParseException {
     PhoneNumber phoneNumber = new PhoneNumber();
-    parse(numberToParse, defaultCountry, phoneNumber);
+    parse(numberToParse, defaultRegion, phoneNumber);
     return phoneNumber;
   }
 
   // Same as parse(String, String), but accepts mutable PhoneNumber as a parameter to
   // decrease object creation when invoked many times.
-  public void parse(String numberToParse, String defaultCountry, PhoneNumber phoneNumber)
+  public void parse(String numberToParse, String defaultRegion, PhoneNumber phoneNumber)
       throws NumberParseException {
-    parseHelper(numberToParse, defaultCountry, false, true, phoneNumber);
+    parseHelper(numberToParse, defaultRegion, false, true, phoneNumber);
   }
 
   /**
-   * Parses a string and returns it in proto buffer format. This method differs from parse() in that
-   * it always populates the raw_input field of the protocol buffer with numberToParse as well as
-   * the country_code_source field.
+   * Parses a string and returns it in proto buffer format. This method differs from {@link #parse}
+   * in that it always populates the raw_input field of the protocol buffer with numberToParse as
+   * well as the country_code_source field.
    *
    * @param numberToParse     number that we are attempting to parse. This can contain formatting
    *                          such as +, ( and -, as well as a phone number extension.
-   * @param defaultCountry    the ISO 3166-1 two-letter country code that denotes the country that
+   * @param defaultRegion     the ISO 3166-1 two-letter region code that denotes the region that
    *                          we are expecting the number to be from. This is only used if the
    *                          number being parsed is not written in international format. The
-   *                          country code for the number in this case would be stored as that of
-   *                          the default country supplied.
+   *                          country calling code for the number in this case would be stored as
+   *                          that of the default region supplied.
    * @return                  a phone number proto buffer filled with the parsed number
    * @throws NumberParseException  if the string is not considered to be a viable phone number or if
-   *                               no default country was supplied
+   *                               no default region was supplied
    */
-  public PhoneNumber parseAndKeepRawInput(String numberToParse, String defaultCountry)
+  public PhoneNumber parseAndKeepRawInput(String numberToParse, String defaultRegion)
       throws NumberParseException {
     PhoneNumber phoneNumber = new PhoneNumber();
-    parseAndKeepRawInput(numberToParse, defaultCountry, phoneNumber);
+    parseAndKeepRawInput(numberToParse, defaultRegion, phoneNumber);
     return phoneNumber;
   }
 
   // Same as parseAndKeepRawInput(String, String), but accepts mutable PhoneNumber as a parameter to
   // decrease object creation when invoked many times.
-  public void parseAndKeepRawInput(String numberToParse, String defaultCountry,
+  public void parseAndKeepRawInput(String numberToParse, String defaultRegion,
                                    PhoneNumber phoneNumber)
       throws NumberParseException {
-    parseHelper(numberToParse, defaultCountry, true, true, phoneNumber);
+    parseHelper(numberToParse, defaultRegion, true, true, phoneNumber);
   }
 
   /**
    * Returns an iterable over all {@link PhoneNumberMatch PhoneNumberMatches} in {@code text}. This
    * is a shortcut for {@link #findNumbers(CharSequence, String, Leniency, long)
-   * getMatcher(text, defaultCountry, Leniency.VALID, Long.MAX_VALUE)}.
+   * getMatcher(text, defaultRegion, Leniency.VALID, Long.MAX_VALUE)}.
    *
    * @param text              the text to search for phone numbers, null for no text
-   * @param defaultCountry    the ISO 3166-1 two-letter country code that denotes the country that
+   * @param defaultRegion     the ISO 3166-1 two-letter region code that denotes the region that
    *                          we are expecting the number to be from. This is only used if the
    *                          number being parsed is not written in international format. The
-   *                          country code for the number in this case would be stored as that of
-   *                          the default country supplied. May be null if only international
+   *                          country calling code for the number in this case would be stored as
+   *                          that of the default region supplied. May be null if only international
    *                          numbers are expected.
    */
-  public Iterable<PhoneNumberMatch> findNumbers(CharSequence text, String defaultCountry) {
-    return findNumbers(text, defaultCountry, Leniency.VALID, Long.MAX_VALUE);
+  public Iterable<PhoneNumberMatch> findNumbers(CharSequence text, String defaultRegion) {
+    return findNumbers(text, defaultRegion, Leniency.VALID, Long.MAX_VALUE);
   }
 
   /**
    * Returns an iterable over all {@link PhoneNumberMatch PhoneNumberMatches} in {@code text}.
    *
    * @param text              the text to search for phone numbers, null for no text
-   * @param defaultCountry    the ISO 3166-1 two-letter country code that denotes the country that
+   * @param defaultRegion    the ISO 3166-1 two-letter region code that denotes the region that
    *                          we are expecting the number to be from. This is only used if the
    *                          number being parsed is not written in international format. The
-   *                          country code for the number in this case would be stored as that of
-   *                          the default country supplied. May be null if only international
+   *                          country calling code for the number in this case would be stored as
+   *                          that of the default region supplied. May be null if only international
    *                          numbers are expected.
    * @param leniency          the leniency to use when evaluating candidate phone numbers
    * @param maxTries          the maximum number of invalid numbers to try before giving up on the
@@ -1971,24 +2167,24 @@ public class PhoneNumberUtil {
    *                          false positives in it. Must be {@code >= 0}.
    */
   public Iterable<PhoneNumberMatch> findNumbers(
-      final CharSequence text, final String defaultCountry, final Leniency leniency,
+      final CharSequence text, final String defaultRegion, final Leniency leniency,
       final long maxTries) {
 
     return new Iterable<PhoneNumberMatch>() {
       public Iterator<PhoneNumberMatch> iterator() {
         return new PhoneNumberMatcher(
-            PhoneNumberUtil.this, text, defaultCountry, leniency, maxTries);
+            PhoneNumberUtil.this, text, defaultRegion, leniency, maxTries);
       }
     };
   }
 
   /**
    * Parses a string and fills up the phoneNumber. This method is the same as the public
-   * parse() method, with the exception that it allows the default country to be null, for use by
-   * isNumberMatch(). checkRegion should be set to false if it is permitted for the default country
+   * parse() method, with the exception that it allows the default region to be null, for use by
+   * isNumberMatch(). checkRegion should be set to false if it is permitted for the default region
    * to be null or unknown ("ZZ").
    */
-  private void parseHelper(String numberToParse, String defaultCountry, boolean keepRawInput,
+  private void parseHelper(String numberToParse, String defaultRegion, boolean keepRawInput,
                            boolean checkRegion, PhoneNumber phoneNumber)
       throws NumberParseException {
     if (numberToParse == null) {
@@ -2003,42 +2199,42 @@ public class PhoneNumberUtil {
                                      "The string supplied did not seem to be a phone number.");
     }
 
-    // Check the country supplied is valid, or that the extracted number starts with some sort of +
+    // Check the region supplied is valid, or that the extracted number starts with some sort of +
     // sign so the number's region can be determined.
-    if (checkRegion && !checkRegionForParsing(number, defaultCountry)) {
+    if (checkRegion && !checkRegionForParsing(number, defaultRegion)) {
       throw new NumberParseException(NumberParseException.ErrorType.INVALID_COUNTRY_CODE,
-                                     "Missing or invalid default country.");
+                                     "Missing or invalid default region.");
     }
 
     if (keepRawInput) {
       phoneNumber.setRawInput(numberToParse);
     }
     StringBuffer nationalNumber = new StringBuffer(number);
-    // Attempt to parse extension first, since it doesn't require country-specific data and we want
+    // Attempt to parse extension first, since it doesn't require region-specific data and we want
     // to have the non-normalised number here.
     String extension = maybeStripExtension(nationalNumber);
     if (extension.length() > 0) {
       phoneNumber.setExtension(extension);
     }
 
-    PhoneMetadata countryMetadata = getMetadataForRegion(defaultCountry);
+    PhoneMetadata regionMetadata = getMetadataForRegion(defaultRegion);
     // Check to see if the number is given in international format so we know whether this number is
-    // from the default country or not.
+    // from the default region or not.
     StringBuffer normalizedNationalNumber = new StringBuffer();
-    int countryCode = maybeExtractCountryCode(nationalNumber.toString(), countryMetadata,
+    int countryCode = maybeExtractCountryCode(nationalNumber.toString(), regionMetadata,
                                               normalizedNationalNumber, keepRawInput, phoneNumber);
     if (countryCode != 0) {
       String phoneNumberRegion = getRegionCodeForCountryCode(countryCode);
-      if (!phoneNumberRegion.equals(defaultCountry)) {
-        countryMetadata = getMetadataForRegion(phoneNumberRegion);
+      if (!phoneNumberRegion.equals(defaultRegion)) {
+        regionMetadata = getMetadataForRegion(phoneNumberRegion);
       }
     } else {
-      // If no extracted country code, use the region supplied instead. The national number is just
-      // the normalized version of the number we were given to parse.
+      // If no extracted country calling code, use the region supplied instead. The national number
+      // is just the normalized version of the number we were given to parse.
       normalize(nationalNumber);
       normalizedNationalNumber.append(nationalNumber);
-      if (defaultCountry != null) {
-        countryCode = countryMetadata.getCountryCode();
+      if (defaultRegion != null) {
+        countryCode = regionMetadata.getCountryCode();
         phoneNumber.setCountryCode(countryCode);
       } else if (keepRawInput) {
         phoneNumber.clearCountryCodeSource();
@@ -2048,9 +2244,9 @@ public class PhoneNumberUtil {
       throw new NumberParseException(NumberParseException.ErrorType.TOO_SHORT_NSN,
                                      "The string supplied is too short to be a phone number.");
     }
-    if (countryMetadata != null) {
+    if (regionMetadata != null) {
       String carrierCode =
-          maybeStripNationalPrefixAndCarrierCode(normalizedNationalNumber, countryMetadata);
+          maybeStripNationalPrefixAndCarrierCode(normalizedNationalNumber, regionMetadata);
       if (keepRawInput) {
         phoneNumber.setPreferredDomesticCarrierCode(carrierCode);
       }
@@ -2065,7 +2261,8 @@ public class PhoneNumberUtil {
                                      "The string supplied is too long to be a phone number.");
     }
     if (normalizedNationalNumber.charAt(0) == '0' &&
-        isLeadingZeroCountry(countryCode)) {
+        regionMetadata != null &&
+        regionMetadata.isLeadingZeroPossible()) {
       phoneNumber.setItalianLeadingZero(true);
     }
     phoneNumber.setNationalNumber(Long.parseLong(normalizedNationalNumber.toString()));
@@ -2074,12 +2271,12 @@ public class PhoneNumberUtil {
   /**
    * Takes two phone numbers and compares them for equality.
    *
-   * Returns EXACT_MATCH if the country code, NSN, presence of a leading zero for Italian numbers
+   * <p>Returns EXACT_MATCH if the country_code, NSN, presence of a leading zero for Italian numbers
    * and any extension present are the same.
-   * Returns NSN_MATCH if either or both has no country specified, and the NSNs and extensions are
+   * Returns NSN_MATCH if either or both has no region specified, and the NSNs and extensions are
    * the same.
-   * Returns SHORT_NSN_MATCH if either or both has no country specified, or the country specified
-   * is the same, and one NSN could be a shorter version of the other number. This includes the case
+   * Returns SHORT_NSN_MATCH if either or both has no region specified, or the region specified is
+   * the same, and one NSN could be a shorter version of the other number. This includes the case
    * where one has an extension specified, and the other does not.
    * Returns NO_MATCH otherwise.
    * For example, the numbers +1 345 657 1234 and 657 1234 are a SHORT_NSN_MATCH.
@@ -2120,7 +2317,7 @@ public class PhoneNumberUtil {
     }
     int firstNumberCountryCode = firstNumber.getCountryCode();
     int secondNumberCountryCode = secondNumber.getCountryCode();
-    // Both had country code specified.
+    // Both had country_code specified.
     if (firstNumberCountryCode != 0 && secondNumberCountryCode != 0) {
       if (firstNumber.exactlySameAs(secondNumber)) {
         return MatchType.EXACT_MATCH;
@@ -2134,8 +2331,8 @@ public class PhoneNumberUtil {
       // This is not a match.
       return MatchType.NO_MATCH;
     }
-    // Checks cases where one or both country codes were not specified. To make equality checks
-    // easier, we first set the country codes to be equal.
+    // Checks cases where one or both country_code fields were not specified. To make equality
+    // checks easier, we first set the country_code fields to be equal.
     firstNumber.setCountryCode(secondNumberCountryCode);
     // If all else was the same, then this is an NSN_MATCH.
     if (firstNumber.exactlySameAs(secondNumber)) {
@@ -2159,11 +2356,10 @@ public class PhoneNumberUtil {
 
   /**
    * Takes two phone numbers as strings and compares them for equality. This is a convenience
-   * wrapper for isNumberMatch(PhoneNumber firstNumber, PhoneNumber secondNumber). No default region
-   * is known.
+   * wrapper for {@link #isNumberMatch(PhoneNumber, PhoneNumber)}. No default region is known.
    *
-   * @param firstNumber  first number to compare. Can contain formatting, and can have country code
-   *     specified with + at the start.
+   * @param firstNumber  first number to compare. Can contain formatting, and can have country
+   *     calling code specified with + at the start.
    * @param secondNumber  second number to compare. Can contain formatting, and can have country
    *     code specified with + at the start.
    * @return  NOT_A_NUMBER, NO_MATCH, SHORT_NSN_MATCH, NSN_MATCH, EXACT_MATCH. See
@@ -2208,13 +2404,14 @@ public class PhoneNumberUtil {
    *     isNumberMatch(PhoneNumber firstNumber, PhoneNumber secondNumber) for more details.
    */
   public MatchType isNumberMatch(PhoneNumber firstNumber, String secondNumber) {
-    // First see if the second number has an implicit country code, by attempting to parse it.
+    // First see if the second number has an implicit country calling code, by attempting to parse
+    // it.
     try {
       PhoneNumber secondNumberAsProto = parse(secondNumber, UNKNOWN_REGION);
       return isNumberMatch(firstNumber, secondNumberAsProto);
     } catch (NumberParseException e) {
       if (e.getErrorType() == NumberParseException.ErrorType.INVALID_COUNTRY_CODE) {
-        // The second number has no country code. EXACT_MATCH is no longer possible.
+        // The second number has no country calling code. EXACT_MATCH is no longer possible.
         // We parse it as if the region was the same as that for the first number, and if
         // EXACT_MATCH is returned, we replace this with NSN_MATCH.
         String firstNumberRegion = getRegionCodeForCountryCode(firstNumber.getCountryCode());
@@ -2227,8 +2424,8 @@ public class PhoneNumberUtil {
             }
             return match;
           } else {
-            // If the first number didn't have a valid country code, then we parse the second number
-            // without one as well.
+            // If the first number didn't have a valid country calling code, then we parse the
+            // second number without one as well.
             PhoneNumber secondNumberProto = new PhoneNumber();
             parseHelper(secondNumber, null, false, false, secondNumberProto);
             return isNumberMatch(firstNumber, secondNumberProto);
@@ -2243,14 +2440,14 @@ public class PhoneNumberUtil {
   }
 
   /**
-   * Returns true if the number can only be dialled from within the country. If unknown, or the
-   * number can be dialled from outside the country as well, returns false. Does not check the
+   * Returns true if the number can only be dialled from within the region. If unknown, or the
+   * number can be dialled from outside the region as well, returns false. Does not check the
    * number is a valid number.
    * TODO: Make this method public when we have enough metadata to make it worthwhile. Currently
    * visible for testing purposes only.
    *
    * @param number  the phone-number for which we want to know whether it is only diallable from
-   *     within the country
+   *     within the region
    */
   boolean canBeInternationallyDialled(PhoneNumber number) {
     String regionCode = getRegionCodeForNumber(number);
index 98dd52f..d8da296 100644 (file)
@@ -57,10 +57,10 @@ public final class Phonemetadata {
 
     // repeated string leading_digits_pattern = 3;
     private java.util.List<String> leadingDigitsPattern_ = new java.util.ArrayList<String>();
-    public java.util.List<String> getLeadingDigitsPatternList() {
+    public java.util.List<String> leadingDigitPatterns() {
       return leadingDigitsPattern_;
     }
-    public int getLeadingDigitsPatternCount() { return leadingDigitsPattern_.size(); }
+    public int leadingDigitsPatternSize() { return leadingDigitsPattern_.size(); }
     public String getLeadingDigitsPattern(int index) {
       return leadingDigitsPattern_.get(index);
     }
@@ -108,7 +108,7 @@ public final class Phonemetadata {
       if (other.hasFormat()) {
         setFormat(other.getFormat());
       }
-      int leadingDigitsPatternSize = other.getLeadingDigitsPatternCount();
+      int leadingDigitsPatternSize = other.leadingDigitsPatternSize();
       for (int i = 0; i < leadingDigitsPatternSize; i++) {
         addLeadingDigitsPattern(other.getLeadingDigitsPattern(i));
       }
@@ -124,7 +124,7 @@ public final class Phonemetadata {
     public void writeExternal(ObjectOutput objectOutput) throws IOException {
       objectOutput.writeUTF(pattern_);
       objectOutput.writeUTF(format_);
-      int leadingDigitsPatternSize = getLeadingDigitsPatternCount();
+      int leadingDigitsPatternSize = leadingDigitsPatternSize();
       objectOutput.writeInt(leadingDigitsPatternSize);
       for (int i = 0; i < leadingDigitsPatternSize; i++) {
         objectOutput.writeUTF(leadingDigitsPattern_.get(i));
@@ -503,10 +503,10 @@ public final class Phonemetadata {
 
     // repeated NumberFormat number_format = 19;
     private java.util.List<NumberFormat> numberFormat_ = new java.util.ArrayList<NumberFormat>();
-    public java.util.List<NumberFormat> getNumberFormatList() {
+    public java.util.List<NumberFormat> numberFormats() {
       return numberFormat_;
     }
-    public int getNumberFormatCount() { return numberFormat_.size(); }
+    public int numberFormatSize() { return numberFormat_.size(); }
     public NumberFormat getNumberFormat(int index) {
       return numberFormat_.get(index);
     }
@@ -521,10 +521,10 @@ public final class Phonemetadata {
     // repeated NumberFormat intl_number_format = 20;
     private java.util.List<NumberFormat> intlNumberFormat_ =
         new java.util.ArrayList<NumberFormat>();
-    public java.util.List<NumberFormat> getIntlNumberFormatList() {
+    public java.util.List<NumberFormat> intlNumberFormats() {
       return intlNumberFormat_;
     }
-    public int getIntlNumberFormatCount() { return intlNumberFormat_.size(); }
+    public int intlNumberFormatSize() { return intlNumberFormat_.size(); }
     public NumberFormat getIntlNumberFormat(int index) {
       return intlNumberFormat_.get(index);
     }
@@ -559,6 +559,17 @@ public final class Phonemetadata {
       return this;
     }
 
+    // optional bool leading_zero_possible = 26 [default = false];
+    private boolean hasLeadingZeroPossible;
+    private boolean leadingZeroPossible_ = false;
+    public boolean hasLeadingZeroPossible() { return hasLeadingZeroPossible; }
+    public boolean isLeadingZeroPossible() { return leadingZeroPossible_; }
+    public PhoneMetadata setLeadingZeroPossible(boolean value) {
+      hasLeadingZeroPossible = true;
+      leadingZeroPossible_ = value;
+      return this;
+    }
+
     public void writeExternal(ObjectOutput objectOutput) throws IOException {
       objectOutput.writeBoolean(hasGeneralDesc);
       if (hasGeneralDesc) {
@@ -636,13 +647,13 @@ public final class Phonemetadata {
 
       objectOutput.writeBoolean(sameMobileAndFixedLinePattern_);
 
-      int numberFormatSize = getNumberFormatCount();
+      int numberFormatSize = numberFormatSize();
       objectOutput.writeInt(numberFormatSize);
       for (int i = 0; i < numberFormatSize; i++) {
         numberFormat_.get(i).writeExternal(objectOutput);
       }
 
-      int intlNumberFormatSize = getIntlNumberFormatCount();
+      int intlNumberFormatSize = intlNumberFormatSize();
       objectOutput.writeInt(intlNumberFormatSize);
       for (int i = 0; i < intlNumberFormatSize; i++) {
         intlNumberFormat_.get(i).writeExternal(objectOutput);
@@ -654,6 +665,8 @@ public final class Phonemetadata {
       if (hasLeadingDigits) {
         objectOutput.writeUTF(leadingDigits_);
       }
+
+      objectOutput.writeBoolean(leadingZeroPossible_);
     }
 
     public void readExternal(ObjectInput objectInput) throws IOException {
@@ -775,6 +788,8 @@ public final class Phonemetadata {
       if (hasString) {
         setLeadingDigits(objectInput.readUTF());
       }
+
+      setLeadingZeroPossible(objectInput.readBoolean());
     }
   }
 
index 5bf4289..d0069f1 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AC and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AC differ
index 62b3b29..2f5199b 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AD and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AD differ
index cce7540..2f543e1 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AE and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AE differ
index 6922340..0120a23 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AF and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AF differ
index f0b7c4f..8679e74 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AG and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AG differ
index 403d693..8a36237 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AI and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AI differ
index 560b677..15cbd77 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AL and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AL differ
index e1488b3..45ee014 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AM and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AM differ
index 73a83e8..e2aa056 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AN and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AN differ
index 304cb0a..13a5285 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AO and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AO differ
index 44a3b68..5da4db1 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AR and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AR differ
index 8728b28..81d04c8 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AS and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AS differ
index f2b645c..720010c 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AT and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AT differ
index 4c1cfb4..24ad5c8 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AU and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AU differ
index 1c7842e..00b0173 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AW and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AW differ
index ca83c98..4b3d331 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AZ and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AZ differ
index 3c9e268..c5e36f6 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BA and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BA differ
index 0b60e57..74345e7 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BB and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BB differ
index 872fc63..f335c39 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BD and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BD differ
index b0074bf..fa90f75 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BE and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BE differ
index cd1431f..a450f51 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BF and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BF differ
index ed3913d..e1e34d9 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BG and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BG differ
index a7b67c4..3589ec9 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BH and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BH differ
index 40ecfcb..2b67b00 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BI and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BI differ
index 1fb8318..e5ef1ec 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BJ and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BJ differ
index de4b804..b410d02 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BL and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BL differ
index f51c6f7..9bb1b0a 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BM and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BM differ
index 0fe3d38..46b0177 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BN and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BN differ
index 0395299..8e8857c 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BO and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BO differ
index 67fe311..9aa4d28 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BR and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BR differ
index e72eaac..4ba983c 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BS and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BS differ
index c04cc47..139f181 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BT and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BT differ
index 752f852..acbe7e1 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BW and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BW differ
index 91b8207..969f182 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BY and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BY differ
index ec98a81..d1d270b 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BZ and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BZ differ
index 08a19c1..d58714a 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CA and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CA differ
index 029f0e9..4456d29 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CD and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CD differ
index 440ee17..eeb5eeb 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CF and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CF differ
index dfc82a1..6b809d4 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CG and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CG differ
index b9781b3..1b520c3 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CH and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CH differ
index c647c3d..15a95d6 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CI and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CI differ
index 2ce83c2..4f01ce2 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CK and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CK differ
index 2e9c0d8..8fabf74 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CL and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CL differ
index 414c1dd..5fb3c1f 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CM and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CM differ
index aeb8224..913120f 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CN and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CN differ
index e89645a..f893bd7 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CO and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CO differ
index 979fa17..942b646 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CR and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CR differ
index 58728b9..3d2e499 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CU and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CU differ
index 40f6819..947e660 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CV and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CV differ
index 6e910fa..03e18fb 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CY and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CY differ
index 8e4bc85..0d263a1 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CZ and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CZ differ
index 657ff37..87844f3 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DE and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DE differ
index 195b880..2978ffe 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DJ and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DJ differ
index 2b9a712..cbb0f4c 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DK and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DK differ
index 2f46834..486ba15 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DM and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DM differ
index 0100b93..5ee5e4d 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DO and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DO differ
index 9551e58..c3d52a0 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DZ and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DZ differ
index 5078020..1b59c23 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EC and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EC differ
index 45242fe..8387a3b 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EE and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EE differ
index 1b383cb..e3a1c56 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EG and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EG differ
index 7207396..5c25636 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ER and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ER differ
index 81c67e2..17bf185 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ES and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ES differ
index 6c1a588..443dcb9 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ET and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ET differ
index 925e740..982c8dd 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FI and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FI differ
index dfc6432..616f4c6 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FJ and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FJ differ
index 9630d47..9ef7a8c 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FK and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FK differ
index f3f3699..f58dc40 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FM and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FM differ
index 2d2ff18..f6641dd 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FO and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FO differ
index 2b16dea..7a2adfd 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FR and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FR differ
index f923cae..800c4f2 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GA and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GA differ
index 9f4e327..b1ffcc9 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GB and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GB differ
index f2e6c56..b54ca62 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GD and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GD differ
index 22f3da2..f194107 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GE and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GE differ
index e82b26c..fd17d8d 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GF and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GF differ
index ae3cec7..7d24686 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GG and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GG differ
index 82ff8e4..3cf818d 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GH and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GH differ
index 63a685f..6625331 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GI and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GI differ
index f8dc2b0..f50ade6 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GL and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GL differ
index 27ce34f..abef42b 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GM and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GM differ
index dde6c53..c865a17 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GN and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GN differ
index f6108ee..2c21e74 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GP and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GP differ
index c3bd13e..a94a26e 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GQ and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GQ differ
index ed28df8..2c4a828 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GR and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GR differ
index b91516c..5d68cc6 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GT and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GT differ
index 237d37a..3a455de 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GU and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GU differ
index a755f36..9ca2299 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GW and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GW differ
index 10f48a7..e6666f9 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GY and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GY differ
index 01b773d..260696b 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HK and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HK differ
index 502c311..8aa3857 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HN and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HN differ
index 3089e8b..9766d56 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HR and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HR differ
index 11abb56..6d4d7b7 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HT and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HT differ
index 90009c0..79efc3c 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HU and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HU differ
index 0c2803e..c2d6738 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ID and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ID differ
index 706aedd..bd1e9ed 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IE and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IE differ
index d39b391..f784b0f 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IL and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IL differ
index 30bb20e..ab78e3a 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IM and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IM differ
index 60dd9da..f8fafa9 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IN and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IN differ
index f15346f..3213c5a 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IO and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IO differ
index ab713bb..475492f 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IQ and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IQ differ
index 35827c0..a5b3394 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IR and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IR differ
index 233e357..eb45cb4 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IS and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IS differ
index 8c81e18..ae03581 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IT and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IT differ
index 2e3c4d5..37dc706 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JE and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JE differ
index 77c4efc..eef5197 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JM and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JM differ
index 6c8e265..cc0d091 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JO and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JO differ
index 9650864..4773220 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JP and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JP differ
index bfd69a4..72d80a6 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KE and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KE differ
index 06d1f7d..c4e37cf 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KG and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KG differ
index 0ddca18..f34f0eb 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KH and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KH differ
index 377f39b..2cf4365 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KI and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KI differ
index a2d3de6..7c76143 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KM and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KM differ
index 863b3eb..746a95a 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KN and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KN differ
index eccdf9e..dbc742e 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KP and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KP differ
index e66f157..f74cb4d 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KR and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KR differ
index 7ab6e36..475d794 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KW and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KW differ
index 754551b..2e285c1 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KY and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KY differ
index b0b73df..bf98d95 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KZ and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KZ differ
index 984aeba..7f78cb8 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LA and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LA differ
index ab97154..c6b6e14 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LB and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LB differ
index 296fe41..3b3ab6b 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LC and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LC differ
index 37693c5..e792149 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LI and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LI differ
index 4092102..2b06a38 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LK and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LK differ
index c5cfee6..0b4373c 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LR and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LR differ
index ca98900..e65316e 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LS and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LS differ
index 43b750c..02ad948 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LT and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LT differ
index 1b31374..ef5e720 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LU and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LU differ
index 631d6f2..80c3aa3 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LV and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LV differ
index 6fb9f25..0873564 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LY and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LY differ
index bf69698..dd0beb5 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MA and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MA differ
index 61e560f..1a80b90 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MC and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MC differ
index edc5d0f..17917ff 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MD and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MD differ
index 056305b..352802e 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ME and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ME differ
index 29c214b..2daec61 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MF and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MF differ
index b0c8bf2..7eef113 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MG and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MG differ
index 131f198..2df3a70 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MH and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MH differ
index 9b94a61..040a791 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MK and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MK differ
index d1efd0f..c7d6d18 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ML and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ML differ
index 8c35059..fbe65bc 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MM and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MM differ
index 0d76175..ebbcc6c 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MN and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MN differ
index a72a4bc..d0bb6ae 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MO and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MO differ
index 312659b..7b51d36 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MP and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MP differ
index 6a495d7..0c29b3d 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MQ and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MQ differ
index fd21ea7..dd9fa9e 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MR and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MR differ
index c1ad3b3..b31c305 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MS and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MS differ
index 9dcbbbf..e4ef74a 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MT and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MT differ
index a65c8e3..cde515f 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MU and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MU differ
index 49e9b28..cef8e08 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MV and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MV differ
index 4529ee1..36fe6c9 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MW and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MW differ
index c857d1d..15746f7 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MX and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MX differ
index 47e64ec..35b8414 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MY and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MY differ
index 6ae79b9..5128f4e 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MZ and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MZ differ
index 046be15..5c54aa0 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NA and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NA differ
index a6ce4d0..c8091d1 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NC and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NC differ
index 05e12c3..62309e5 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NE and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NE differ
index e4ef5e8..ab79274 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NF and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NF differ
index 09939ff..4e12b36 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NG and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NG differ
index 5eb33fe..437f7d1 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NI and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NI differ
index 79c8741..f0a7b30 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NL and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NL differ
index de77f88..b258bad 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NO and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NO differ
index 74caa04..3811c44 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NP and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NP differ
index 72e46b3..c09d246 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NR and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NR differ
index d33aa7a..ac5a701 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NU and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NU differ
index 20dc762..199e3c2 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NZ and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NZ differ
index aa0e794..a3ce6c1 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_OM and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_OM differ
index c8c2c76..ed88608 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PA and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PA differ
index 45de89d..6f97174 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PE and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PE differ
index 30924a4..bbdd91b 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PF and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PF differ
index 067b499..767f47c 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PG and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PG differ
index 5810c29..8eb72c8 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PH and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PH differ
index a7a82f7..1c37c1c 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PK and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PK differ
index 2d51c34..012f5b7 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PL and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PL differ
index e645cd2..0041418 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PM and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PM differ
index 335b318..7adcde0 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PR and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PR differ
index 21b9986..1114659 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PS and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PS differ
index bb7270f..9c691cc 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PT and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PT differ
index d65d876..1b99676 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PW and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PW differ
index 0735436..ab59e41 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PY and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PY differ
index 4717ebd..da69ee2 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_QA and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_QA differ
index fa0ccb4..0a282a4 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RE and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RE differ
index 595878e..d45708a 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RO and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RO differ
index cc359b1..6f97714 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RS and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RS differ
index 9589b84..189e57f 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RU and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RU differ
index 63319ce..9b1ce03 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RW and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RW differ
index ec5abcc..a938bbf 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SA and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SA differ
index 464b8ec..a640f68 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SB and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SB differ
index 3d74da0..64ab38b 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SC and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SC differ
index 34968f0..37871a1 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SD and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SD differ
index fb42a83..2c43813 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SE and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SE differ
index 9071c3f..6020eb3 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SG and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SG differ
index c52c527..e928407 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SH and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SH differ
index 927774b..b9df92b 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SI and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SI differ
index b755b5c..50b4e3a 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SK and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SK differ
index c3fd293..5ab8432 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SL and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SL differ
index ea97ce1..4892c60 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SM and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SM differ
index 535afa3..095a494 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SN and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SN differ
index 334be74..2db9450 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SO and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SO differ
index b563d07..c1dc5a1 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SR and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SR differ
index 29b7d36..9a8a7ec 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ST and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ST differ
index 0a299cf..0fc9f70 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SV and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SV differ
index 9c547de..2863ef1 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SY and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SY differ
index 663f11a..bca54b0 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SZ and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SZ differ
index 8034cbd..056739d 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TC and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TC differ
index cfde8b7..dc573d1 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TD and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TD differ
index d18541d..8e7ef30 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TF and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TF differ
index d6b9654..523c84b 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TG and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TG differ
index e7f2c33..119af7d 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TH and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TH differ
index 5a3fd6f..0796984 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TJ and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TJ differ
index 653d606..87012f4 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TK and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TK differ
index 8b4378c..3e96e18 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TL and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TL differ
index c3c8de1..b3b4ad8 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TM and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TM differ
index b9ffbfd..7a24c41 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TN and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TN differ
index 4497b3f..10728f3 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TO and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TO differ
index 0d20cbb..32b88e1 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TR and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TR differ
index bdbaf96..ddbdfc6 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TT and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TT differ
index 8cf631d..792d297 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TV and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TV differ
index 63963cf..08b4172 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TW and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TW differ
index 0f99acb..b5c29af 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TZ and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TZ differ
index a5d2806..f74e132 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UA and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UA differ
index 4eb5563..7ce2b57 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UG and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UG differ
index 25b3668..03d97c8 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_US and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_US differ
index 2a198e6..b717cb1 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UY and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UY differ
index 2a307b3..05c6854 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UZ and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UZ differ
index a0be427..0b7f9ee 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VA and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VA differ
index ab04383..9d28676 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VC and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VC differ
index 96b653f..1db7196 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VE and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VE differ
index e7d7db7..6d1fbe2 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VG and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VG differ
index 88428e8..fd9447d 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VI and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VI differ
index a463207..6f2b378 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VN and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VN differ
index a79ddef..2c79ade 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VU and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VU differ
index 423e86d..43f1162 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_WF and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_WF differ
index 52fd0e7..9022baa 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_WS and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_WS differ
index e4e2e78..b18ec98 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_YE and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_YE differ
index 5d3b0f9..ae7df49 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_YT and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_YT differ
index 19896c6..15930b3 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZA and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZA differ
index 99c8152..2b341ab 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZM and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZM differ
index 13aa728..45b6bc1 100644 (file)
Binary files a/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZW and b/java/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZW differ
index 4920676..6a48dcc 100644 (file)
@@ -391,10 +391,10 @@ public class AsYouTypeFormatterTest extends TestCase {
     assertEquals("0", formatter.inputDigit('0'));
     assertEquals("03", formatter.inputDigit('3'));
     assertEquals("030", formatter.inputDigit('0'));
-    assertEquals("030 1", formatter.inputDigit('1'));
-    assertEquals("030 12", formatter.inputDigit('2'));
-    assertEquals("030 123", formatter.inputDigit('3'));
-    assertEquals("030 1234", formatter.inputDigit('4'));
+    assertEquals("030/1", formatter.inputDigit('1'));
+    assertEquals("030/12", formatter.inputDigit('2'));
+    assertEquals("030/123", formatter.inputDigit('3'));
+    assertEquals("030/1234", formatter.inputDigit('4'));
 
     // 04134 1234
     formatter.clear();
index 1d83fa7..776bb22 100644 (file)
@@ -65,7 +65,7 @@ public class ExampleNumbersTest extends TestCase {
    */
   private void checkNumbersValidAndCorrectType(PhoneNumberType exampleNumberRequestedType,
                                                Set<PhoneNumberType> possibleExpectedTypes) {
-    for (String regionCode : phoneNumberUtil.getSupportedCountries()) {
+    for (String regionCode : phoneNumberUtil.getSupportedRegions()) {
       PhoneNumber exampleNumber =
           phoneNumberUtil.getExampleNumberForType(regionCode, exampleNumberRequestedType);
       if (exampleNumber != null) {
@@ -149,7 +149,7 @@ public class ExampleNumbersTest extends TestCase {
   }
 
   public void testCanBeInternationallyDialled() throws Exception {
-    for (String regionCode : phoneNumberUtil.getSupportedCountries()) {
+    for (String regionCode : phoneNumberUtil.getSupportedRegions()) {
       PhoneNumber exampleNumber = null;
       PhoneNumberDesc desc =
           phoneNumberUtil.getMetadataForRegion(regionCode).getNoInternationalDialling();
index a9e5143..432e6c8 100644 (file)
@@ -55,7 +55,7 @@ public class PhoneNumberUtilTest extends TestCase {
       new PhoneNumber().setCountryCode(61).setNationalNumber(236618300L);
   private static final PhoneNumber BS_MOBILE =
       new PhoneNumber().setCountryCode(1).setNationalNumber(2423570000L);
-  private static final PhoneNumber BS_NUMBER = 
+  private static final PhoneNumber BS_NUMBER =
       new PhoneNumber().setCountryCode(1).setNationalNumber(2423651234L);
   // Note that this is the same as the example number for DE in the metadata.
   private static final PhoneNumber DE_NUMBER =
@@ -124,13 +124,17 @@ public class PhoneNumberUtilTest extends TestCase {
         CountryCodeToRegionCodeMapForTesting.getCountryCodeToRegionCodeMap());
   }
 
+  public void testGetSupportedRegions() {
+    assertTrue(phoneUtil.getSupportedRegions().size() > 0);
+  }
+
   public void testGetInstanceLoadUSMetadata() {
     PhoneMetadata metadata = phoneUtil.getMetadataForRegion(RegionCode.US);
     assertEquals("US", metadata.getId());
     assertEquals(1, metadata.getCountryCode());
     assertEquals("011", metadata.getInternationalPrefix());
     assertTrue(metadata.hasNationalPrefix());
-    assertEquals(2, metadata.getNumberFormatCount());
+    assertEquals(2, metadata.numberFormatSize());
     assertEquals("(\\d{3})(\\d{3})(\\d{4})",
                  metadata.getNumberFormat(0).getPattern());
     assertEquals("$1 $2 $3", metadata.getNumberFormat(0).getFormat());
@@ -151,8 +155,8 @@ public class PhoneNumberUtilTest extends TestCase {
     assertEquals(49, metadata.getCountryCode());
     assertEquals("00", metadata.getInternationalPrefix());
     assertEquals("0", metadata.getNationalPrefix());
-    assertEquals(6, metadata.getNumberFormatCount());
-    assertEquals(1, metadata.getNumberFormat(5).getLeadingDigitsPatternCount());
+    assertEquals(6, metadata.numberFormatSize());
+    assertEquals(1, metadata.getNumberFormat(5).leadingDigitsPatternSize());
     assertEquals("900", metadata.getNumberFormat(5).getLeadingDigitsPattern(0));
     assertEquals("(\\d{3})(\\d{3,4})(\\d{4})",
                  metadata.getNumberFormat(5).getPattern());
@@ -181,6 +185,13 @@ public class PhoneNumberUtilTest extends TestCase {
     assertEquals("$1 $2 $3 $4", metadata.getIntlNumberFormat(3).getFormat());
   }
 
+  public void testIsLeadingZeroPossible() {
+    assertTrue(phoneUtil.isLeadingZeroPossible(39));  // Italy
+    assertFalse(phoneUtil.isLeadingZeroPossible(1));  // USA
+    assertFalse(phoneUtil.isLeadingZeroPossible(800));  // Not in metadata file, just default to
+                                                        // false.
+  }
+
   public void testGetLengthOfGeographicalAreaCode() {
     // Google MTV, which has area code "650".
     assertEquals(3, phoneUtil.getLengthOfGeographicalAreaCode(US_NUMBER));
@@ -235,19 +246,19 @@ public class PhoneNumberUtilTest extends TestCase {
     // An invalid US number (1 digit shorter), which has no NDC.
     assertEquals(0, phoneUtil.getLengthOfNationalDestinationCode(US_SHORT_BY_ONE_NUMBER));
 
-    // A number containing an invalid country code, which shouldn't have any NDC.
+    // A number containing an invalid country calling code, which shouldn't have any NDC.
     PhoneNumber number = new PhoneNumber().setCountryCode(123).setNationalNumber(6502530000L);
     assertEquals(0, phoneUtil.getLengthOfNationalDestinationCode(number));
   }
 
   public void testGetNationalSignificantNumber() {
-    assertEquals("6502530000", PhoneNumberUtil.getNationalSignificantNumber(US_NUMBER));
+    assertEquals("6502530000", phoneUtil.getNationalSignificantNumber(US_NUMBER));
 
     // An Italian mobile number.
-    assertEquals("345678901", PhoneNumberUtil.getNationalSignificantNumber(IT_MOBILE));
+    assertEquals("345678901", phoneUtil.getNationalSignificantNumber(IT_MOBILE));
 
     // An Italian fixed line number.
-    assertEquals("0236618300", PhoneNumberUtil.getNationalSignificantNumber(IT_NUMBER));
+    assertEquals("0236618300", phoneUtil.getNationalSignificantNumber(IT_NUMBER));
   }
 
   public void testGetExampleNumber() {
@@ -314,6 +325,7 @@ public class PhoneNumberUtilTest extends TestCase {
 
     assertEquals("900 253 0000", phoneUtil.format(US_PREMIUM, PhoneNumberFormat.NATIONAL));
     assertEquals("+1 900 253 0000", phoneUtil.format(US_PREMIUM, PhoneNumberFormat.INTERNATIONAL));
+    assertEquals("+1-900-253-0000", phoneUtil.format(US_PREMIUM, PhoneNumberFormat.RFC3966));
   }
 
   public void testFormatBSNumber() {
@@ -332,8 +344,9 @@ public class PhoneNumberUtilTest extends TestCase {
   public void testFormatDENumber() {
     PhoneNumber deNumber = new PhoneNumber();
     deNumber.setCountryCode(49).setNationalNumber(301234L);
-    assertEquals("030 1234", phoneUtil.format(deNumber, PhoneNumberFormat.NATIONAL));
-    assertEquals("+49 30 1234", phoneUtil.format(deNumber, PhoneNumberFormat.INTERNATIONAL));
+    assertEquals("030/1234", phoneUtil.format(deNumber, PhoneNumberFormat.NATIONAL));
+    assertEquals("+49 30/1234", phoneUtil.format(deNumber, PhoneNumberFormat.INTERNATIONAL));
+    assertEquals("+49-30-1234", phoneUtil.format(deNumber, PhoneNumberFormat.RFC3966));
 
     deNumber.clear();
     deNumber.setCountryCode(49).setNationalNumber(291123L);
@@ -444,6 +457,79 @@ public class PhoneNumberUtilTest extends TestCase {
                  phoneUtil.formatOutOfCountryCallingNumber(IT_NUMBER, RegionCode.AU));
   }
 
+  public void testFormatOutOfCountryKeepingAlphaChars() {
+    PhoneNumber alphaNumericNumber = new PhoneNumber();
+    alphaNumericNumber.setCountryCode(1).setNationalNumber(8007493524L)
+        .setRawInput("1800 six-flag");
+    assertEquals("0011 1 800 SIX-FLAG",
+                 phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber, RegionCode.AU));
+
+    alphaNumericNumber.setRawInput("1-800-SIX-flag");
+    assertEquals("0011 1 800-SIX-FLAG",
+                 phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber, RegionCode.AU));
+
+    alphaNumericNumber.setRawInput("Call us from UK: 00 1 800 SIX-flag");
+    assertEquals("0011 1 800 SIX-FLAG",
+                 phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber, RegionCode.AU));
+
+    alphaNumericNumber.setRawInput("800 SIX-flag");
+    assertEquals("0011 1 800 SIX-FLAG",
+                 phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber, RegionCode.AU));
+
+    // Formatting from within the NANPA region.
+    assertEquals("1 800 SIX-FLAG",
+                 phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber, RegionCode.US));
+
+    assertEquals("1 800 SIX-FLAG",
+                 phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber, RegionCode.BS));
+
+    // Testing that if the raw input doesn't exist, it is formatted using
+    // formatOutOfCountryCallingNumber.
+    alphaNumericNumber.clearRawInput();
+    assertEquals("00 1 800 749 3524",
+                 phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber, RegionCode.DE));
+
+    // Testing AU alpha number formatted from Australia.
+    alphaNumericNumber.setCountryCode(61).setNationalNumber(827493524L)
+        .setRawInput("+61 82749-FLAG");
+    // This number should have the national prefix fixed.
+    assertEquals("082749-FLAG",
+                 phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber, RegionCode.AU));
+
+    alphaNumericNumber.setRawInput("082749-FLAG");
+    assertEquals("082749-FLAG",
+                 phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber, RegionCode.AU));
+
+    alphaNumericNumber.setNationalNumber(18007493524L).setRawInput("1-800-SIX-flag");
+    // This number should not have the national prefix prefixed, in accordance with the override for
+    // this specific formatting rule.
+    assertEquals("1-800-SIX-FLAG",
+                 phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber, RegionCode.AU));
+
+    // The metadata should not be permanently changed, since we copied it before modifying patterns.
+    // Here we check this.
+    alphaNumericNumber.setNationalNumber(1800749352L);
+    assertEquals("1800 749 352",
+                 phoneUtil.formatOutOfCountryCallingNumber(alphaNumericNumber, RegionCode.AU));
+
+    // Testing a region with multiple international prefixes.
+    assertEquals("+61 1-800-SIX-FLAG",
+                 phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber, RegionCode.SG));
+
+    // Testing the case with an invalid country calling code.
+    alphaNumericNumber.setCountryCode(0).setNationalNumber(18007493524L)
+        .setRawInput("1-800-SIX-flag");
+    // Uses the raw input only.
+    assertEquals("1-800-SIX-flag",
+                 phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber, RegionCode.DE));
+
+    // Testing the case of an invalid alpha number.
+    alphaNumericNumber.setCountryCode(1).setNationalNumber(80749L).setRawInput("180-SIX");
+    // No country-code stripping can be done.
+    assertEquals("00 1 180-SIX",
+                 phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber, RegionCode.DE));
+  }
+
   public void testFormatWithCarrierCode() {
     // We only support this for AR in our test metadata, and only for mobile numbers starting with
     // certain values.
@@ -487,7 +573,7 @@ public class PhoneNumberUtilTest extends TestCase {
     usNumber.setCountryCode(1).setNationalNumber(4241231234L).setPreferredDomesticCarrierCode("99");
     assertEquals("424 123 1234", phoneUtil.format(usNumber, PhoneNumberFormat.NATIONAL));
     assertEquals("424 123 1234",
-        phoneUtil.formatNationalNumberWithPreferredCarrierCode(usNumber, "15"));    
+        phoneUtil.formatNationalNumberWithPreferredCarrierCode(usNumber, "15"));
   }
 
   public void testFormatByPattern() {
@@ -557,6 +643,8 @@ public class PhoneNumberUtilTest extends TestCase {
     PhoneNumber nzNumber = new PhoneNumber().mergeFrom(NZ_NUMBER).setExtension("1234");
     // Uses default extension prefix:
     assertEquals("03-331 6005 ext. 1234", phoneUtil.format(nzNumber, PhoneNumberFormat.NATIONAL));
+    // Uses RFC 3966 syntax.
+    assertEquals("+64-3-331-6005;ext=1234", phoneUtil.format(nzNumber, PhoneNumberFormat.RFC3966));
     // Extension prefix overridden in the territory information for the US:
     PhoneNumber usNumberWithExtension = new PhoneNumber().mergeFrom(US_NUMBER).setExtension("4567");
     assertEquals("650 253 0000 extn. 4567", phoneUtil.format(usNumberWithExtension,
@@ -805,7 +893,7 @@ public class PhoneNumberUtilTest extends TestCase {
   }
 
   public void testIsPossibleNumberWithReason() {
-    // FYI, national numbers for country code +1 that are within 7 to 10 digits are possible.
+    // National numbers for country calling code +1 that are within 7 to 10 digits are possible.
     assertEquals(PhoneNumberUtil.ValidationResult.IS_POSSIBLE,
                  phoneUtil.isPossibleNumberWithReason(US_NUMBER));
 
@@ -1034,7 +1122,8 @@ public class PhoneNumberUtilTest extends TestCase {
     assertEquals("The number supplied was not stripped of the plus symbol.",
                  strippedNumber.toString(), numberToStrip.toString());
 
-    // If the number afterwards is a zero, we should not strip this - no country code begins with 0.
+    // If the number afterwards is a zero, we should not strip this - no country calling code begins
+    // with 0.
     numberToStrip = new StringBuffer("0090112-3123");
     strippedNumber = new StringBuffer("00901123123");
     assertEquals(CountryCodeSource.FROM_DEFAULT_COUNTRY,
@@ -1056,16 +1145,16 @@ public class PhoneNumberUtilTest extends TestCase {
     try {
       String phoneNumber = "011112-3456789";
       String strippedNumber = "123456789";
-      int countryCode = 1;
+      int countryCallingCode = 1;
       StringBuffer numberToFill = new StringBuffer();
-      assertEquals("Did not extract country code " + countryCode + " correctly.",
-                   countryCode,
+      assertEquals("Did not extract country calling code " + countryCallingCode + " correctly.",
+                   countryCallingCode,
                    phoneUtil.maybeExtractCountryCode(phoneNumber, metadata, numberToFill, true,
                                                      number));
       assertEquals("Did not figure out CountryCodeSource correctly",
                    CountryCodeSource.FROM_NUMBER_WITH_IDD, number.getCountryCodeSource());
       // Should strip and normalize national significant number.
-      assertEquals("Did not strip off the country code correctly.",
+      assertEquals("Did not strip off the country calling code correctly.",
                    strippedNumber,
                    numberToFill.toString());
     } catch (NumberParseException e) {
@@ -1074,10 +1163,10 @@ public class PhoneNumberUtilTest extends TestCase {
     number.clear();
     try {
       String phoneNumber = "+6423456789";
-      int countryCode = 64;
+      int countryCallingCode = 64;
       StringBuffer numberToFill = new StringBuffer();
-      assertEquals("Did not extract country code " + countryCode + " correctly.",
-                   countryCode,
+      assertEquals("Did not extract country calling code " + countryCallingCode + " correctly.",
+                   countryCallingCode,
                    phoneUtil.maybeExtractCountryCode(phoneNumber, metadata, numberToFill, true,
                                                      number));
       assertEquals("Did not figure out CountryCodeSource correctly",
@@ -1089,10 +1178,10 @@ public class PhoneNumberUtilTest extends TestCase {
     try {
       String phoneNumber = "2345-6789";
       StringBuffer numberToFill = new StringBuffer();
-      assertEquals("Should not have extracted a country code - no international prefix present.",
-                   0,
-                   phoneUtil.maybeExtractCountryCode(phoneNumber, metadata, numberToFill, true,
-                                                     number));
+      assertEquals(
+          "Should not have extracted a country calling code - no international prefix present.",
+          0,
+          phoneUtil.maybeExtractCountryCode(phoneNumber, metadata, numberToFill, true, number));
       assertEquals("Did not figure out CountryCodeSource correctly",
                    CountryCodeSource.FROM_DEFAULT_COUNTRY, number.getCountryCodeSource());
     } catch (NumberParseException e) {
@@ -1103,7 +1192,7 @@ public class PhoneNumberUtilTest extends TestCase {
       String phoneNumber = "0119991123456789";
       StringBuffer numberToFill = new StringBuffer();
       phoneUtil.maybeExtractCountryCode(phoneNumber, metadata, numberToFill, true, number);
-      fail("Should have thrown an exception, no valid country code present.");
+      fail("Should have thrown an exception, no valid country calling code present.");
     } catch (NumberParseException e) {
       // Expected.
       assertEquals("Wrong error type stored in exception.",
@@ -1113,10 +1202,10 @@ public class PhoneNumberUtilTest extends TestCase {
     number.clear();
     try {
       String phoneNumber = "(1 610) 619 4466";
-      int countryCode = 1;
+      int countryCallingCode = 1;
       StringBuffer numberToFill = new StringBuffer();
-      assertEquals("Should have extracted the country code of the region passed in",
-                   countryCode,
+      assertEquals("Should have extracted the country calling code of the region passed in",
+                   countryCallingCode,
                    phoneUtil.maybeExtractCountryCode(phoneNumber, metadata, numberToFill, true,
                                                      number));
       assertEquals("Did not figure out CountryCodeSource correctly",
@@ -1128,10 +1217,10 @@ public class PhoneNumberUtilTest extends TestCase {
     number.clear();
     try {
       String phoneNumber = "(1 610) 619 4466";
-      int countryCode = 1;
+      int countryCallingCode = 1;
       StringBuffer numberToFill = new StringBuffer();
-      assertEquals("Should have extracted the country code of the region passed in",
-                   countryCode,
+      assertEquals("Should have extracted the country calling code of the region passed in",
+                   countryCallingCode,
                    phoneUtil.maybeExtractCountryCode(phoneNumber, metadata, numberToFill, false,
                                                      number));
       assertFalse("Should not contain CountryCodeSource.", number.hasCountryCodeSource());
@@ -1142,8 +1231,8 @@ public class PhoneNumberUtilTest extends TestCase {
     try {
       String phoneNumber = "(1 610) 619 446";
       StringBuffer numberToFill = new StringBuffer();
-      assertEquals("Should not have extracted a country code - invalid number after extraction " +
-                   "of uncertain country code.",
+      assertEquals("Should not have extracted a country calling code - invalid number after " +
+                   "extraction of uncertain country calling code.",
                    0,
                    phoneUtil.maybeExtractCountryCode(phoneNumber, metadata, numberToFill, false,
                                                      number));
@@ -1155,8 +1244,8 @@ public class PhoneNumberUtilTest extends TestCase {
     try {
       String phoneNumber = "(1 610) 619 43";
       StringBuffer numberToFill = new StringBuffer();
-      assertEquals("Should not have extracted a country code - invalid number both before and " +
-                   "after extraction of uncertain country code.",
+      assertEquals("Should not have extracted a country calling code - invalid number both " +
+                   "before and after extraction of uncertain country calling code.",
                    0,
                    phoneUtil.maybeExtractCountryCode(phoneNumber, metadata, numberToFill, true,
                                                      number));
@@ -1177,10 +1266,10 @@ public class PhoneNumberUtilTest extends TestCase {
     assertEquals(NZ_NUMBER, phoneUtil.parse("03 331 6005", RegionCode.NZ));
 
     // Testing international prefixes.
-    // Should strip country code.
+    // Should strip country calling code.
     assertEquals(NZ_NUMBER, phoneUtil.parse("0064 3 331 6005", RegionCode.NZ));
     // Try again, but this time we have an international number with Region Code US. It should
-    // recognise the country code and parse accordingly.
+    // recognise the country calling code and parse accordingly.
     assertEquals(NZ_NUMBER, phoneUtil.parse("01164 3 331 6005", RegionCode.US));
     assertEquals(NZ_NUMBER, phoneUtil.parse("+64 3 331 6005", RegionCode.US));
 
@@ -1191,8 +1280,8 @@ public class PhoneNumberUtilTest extends TestCase {
     assertEquals(DE_NUMBER, phoneUtil.parse("301/23456", RegionCode.DE));
 
     PhoneNumber usNumber = new PhoneNumber();
-    // Check it doesn't use the '1' as a country code when parsing if the phone number was already
-    // possible.
+    // Check it doesn't use the '1' as a country calling code when parsing if the phone number was
+    // already possible.
     usNumber.setCountryCode(1).setNationalNumber(1234567890L);
     assertEquals(usNumber, phoneUtil.parse("123-456-7890", RegionCode.US));
   }
@@ -1350,7 +1439,7 @@ public class PhoneNumberUtilTest extends TestCase {
     try {
       String invalidCountryCode = "+210 3456 56789";
       phoneUtil.parse(invalidCountryCode, RegionCode.NZ);
-      fail("This is not a recognised country code: should fail: " + invalidCountryCode);
+      fail("This is not a recognised region code: should fail: " + invalidCountryCode);
     } catch (NumberParseException e) {
       // Expected this exception.
       assertEquals("Wrong error type stored in exception.",
@@ -1359,8 +1448,8 @@ public class PhoneNumberUtilTest extends TestCase {
     }
     try {
       String someNumber = "123 456 7890";
-      phoneUtil.parse(someNumber, "YY");
-      fail("'Unknown' country code not allowed: should fail.");
+      phoneUtil.parse(someNumber, RegionCode.ZZ);
+      fail("'Unknown' region code not allowed: should fail.");
     } catch (NumberParseException e) {
       // Expected this exception.
       assertEquals("Wrong error type stored in exception.",
@@ -1370,7 +1459,7 @@ public class PhoneNumberUtilTest extends TestCase {
     try {
       String someNumber = "123 456 7890";
       phoneUtil.parse(someNumber, RegionCode.CS);
-      fail("Deprecated country code not allowed: should fail.");
+      fail("Deprecated region code not allowed: should fail.");
     } catch (NumberParseException e) {
       // Expected this exception.
       assertEquals("Wrong error type stored in exception.",
@@ -1380,7 +1469,7 @@ public class PhoneNumberUtilTest extends TestCase {
     try {
       String someNumber = "123 456 7890";
       phoneUtil.parse(someNumber, null);
-      fail("Null country code not allowed: should fail.");
+      fail("Null region code not allowed: should fail.");
     } catch (NumberParseException e) {
       // Expected this exception.
       assertEquals("Wrong error type stored in exception.",
@@ -1390,7 +1479,7 @@ public class PhoneNumberUtilTest extends TestCase {
     try {
       String someNumber = "0044------";
       phoneUtil.parse(someNumber, RegionCode.GB);
-      fail("No number provided, only country code: should fail");
+      fail("No number provided, only region code: should fail");
     } catch (NumberParseException e) {
       // Expected this exception.
       assertEquals("Wrong error type stored in exception.",
@@ -1400,7 +1489,7 @@ public class PhoneNumberUtilTest extends TestCase {
     try {
       String someNumber = "0044";
       phoneUtil.parse(someNumber, RegionCode.GB);
-      fail("No number provided, only country code: should fail");
+      fail("No number provided, only region code: should fail");
     } catch (NumberParseException e) {
       // Expected this exception.
       assertEquals("Wrong error type stored in exception.",
@@ -1466,8 +1555,8 @@ public class PhoneNumberUtilTest extends TestCase {
   }
 
   public void testParseNumbersWithPlusWithNoRegion() throws Exception {
-    // "ZZ" is allowed only if the number starts with a '+' - then the country code can be
-    // calculated.
+    // RegionCode.ZZ is allowed only if the number starts with a '+' - then the country calling code
+    // can be calculated.
     assertEquals(NZ_NUMBER, phoneUtil.parse("+64 3 331 6005", RegionCode.ZZ));
     // Test with full-width plus.
     assertEquals(NZ_NUMBER, phoneUtil.parse("\uFF0B64 3 331 6005", RegionCode.ZZ));
@@ -1514,6 +1603,7 @@ public class PhoneNumberUtilTest extends TestCase {
     assertEquals(ukNumber, phoneUtil.parse("+44 2034567890 X  456", RegionCode.GB));
     assertEquals(ukNumber, phoneUtil.parse("+44 2034567890 x 456  ", RegionCode.GB));
     assertEquals(ukNumber, phoneUtil.parse("+44 2034567890  X 456", RegionCode.GB));
+    assertEquals(ukNumber, phoneUtil.parse("+44-2034567890;ext=456", RegionCode.GB));
 
     PhoneNumber usWithExtension = new PhoneNumber();
     usWithExtension.setCountryCode(1).setNationalNumber(8009013355L).setExtension("7246433");
@@ -1577,7 +1667,7 @@ public class PhoneNumberUtilTest extends TestCase {
     // Invalid region code supplied.
     try {
       phoneUtil.parseAndKeepRawInput("123 456 7890", RegionCode.CS);
-      fail("Deprecated country code not allowed: should fail.");
+      fail("Deprecated region code not allowed: should fail.");
     } catch (NumberParseException e) {
       // Expected this exception.
       assertEquals("Wrong error type stored in exception.",
@@ -1614,8 +1704,8 @@ public class PhoneNumberUtilTest extends TestCase {
   }
 
   public void testIsNumberMatchMatches() throws Exception {
-    // Test simple matches where formatting is different, or leading zeroes, or country code has
-    // been specified.
+    // Test simple matches where formatting is different, or leading zeroes, or country calling code
+    // has been specified.
     assertEquals(PhoneNumberUtil.MatchType.EXACT_MATCH,
                  phoneUtil.isNumberMatch("+64 3 331 6005", "+64 03 331 6005"));
     assertEquals(PhoneNumberUtil.MatchType.EXACT_MATCH,
@@ -1665,10 +1755,10 @@ public class PhoneNumberUtilTest extends TestCase {
     // Non-matches.
     assertEquals(PhoneNumberUtil.MatchType.NO_MATCH,
                  phoneUtil.isNumberMatch("03 331 6005", "03 331 6006"));
-    // Different country code, partial number match.
+    // Different country calling code, partial number match.
     assertEquals(PhoneNumberUtil.MatchType.NO_MATCH,
                  phoneUtil.isNumberMatch("+64 3 331-6005", "+16433316005"));
-    // Different country code, same number.
+    // Different country calling code, same number.
     assertEquals(PhoneNumberUtil.MatchType.NO_MATCH,
                  phoneUtil.isNumberMatch("+64 3 331-6005", "+6133316005"));
     // Extension different, all else the same.
@@ -1697,8 +1787,8 @@ public class PhoneNumberUtilTest extends TestCase {
                  phoneUtil.isNumberMatch("3 331-6005", "03 331 6005"));
     assertEquals(PhoneNumberUtil.MatchType.NSN_MATCH,
                  phoneUtil.isNumberMatch(NZ_NUMBER, "03 331 6005"));
-    // Here the second number possibly starts with the country code for New Zealand, although we are
-    // unsure.
+    // Here the second number possibly starts with the country calling code for New Zealand,
+    // although we are unsure.
     PhoneNumber unchangedNzNumber = new PhoneNumber().mergeFrom(NZ_NUMBER);
     assertEquals(PhoneNumberUtil.MatchType.NSN_MATCH,
                  phoneUtil.isNumberMatch(unchangedNzNumber, "(64-3) 331 6005"));
@@ -1740,7 +1830,7 @@ public class PhoneNumberUtilTest extends TestCase {
                  phoneUtil.isNumberMatch("1 234 345 6789", "345 6789"));
     assertEquals(PhoneNumberUtil.MatchType.SHORT_NSN_MATCH,
                  phoneUtil.isNumberMatch("+1 (234) 345 6789", "345 6789"));
-    // NSN matches, country code omitted for one number, extension missing for one.
+    // NSN matches, country calling code omitted for one number, extension missing for one.
     assertEquals(PhoneNumberUtil.MatchType.SHORT_NSN_MATCH,
                  phoneUtil.isNumberMatch("+64 3 331-6005", "3 331 6005#1234"));
     // One has Italian leading zero, one does not.
@@ -1771,4 +1861,11 @@ public class PhoneNumberUtilTest extends TestCase {
     // We have no data for NZ - should return true.
     assertTrue(phoneUtil.canBeInternationallyDialled(NZ_NUMBER));
   }
+
+  public void testIsAlphaNumber() throws Exception {
+    assertTrue(phoneUtil.isAlphaNumber("1800 six-flags"));
+    assertTrue(phoneUtil.isAlphaNumber("1800 six-flags ext. 1234"));
+    assertFalse(phoneUtil.isAlphaNumber("1800 123-1234"));
+    assertFalse(phoneUtil.isAlphaNumber("1800 123-1234 extension: 1234"));
+  }
 }
index f72b264..0554c1f 100644 (file)
Binary files a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AD and b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AD differ
index 486d96d..8f829b8 100644 (file)
Binary files a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AO and b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AO differ
index e2efc8f..26edd00 100644 (file)
Binary files a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AR and b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AR differ
index 8c20ebf..ecd6757 100644 (file)
Binary files a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AU and b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AU differ
index d1a31b0..2c30b61 100644 (file)
Binary files a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_BS and b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_BS differ
index 82b22fb..0c78534 100644 (file)
Binary files a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_DE and b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_DE differ
index 1d2b408..1cbd1f3 100644 (file)
Binary files a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_GB and b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_GB differ
index 3cc5f04..a75f0db 100644 (file)
Binary files a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_IT and b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_IT differ
index 7887d32..82581ad 100644 (file)
Binary files a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_JP and b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_JP differ
index 7c2b942..7f29bca 100644 (file)
Binary files a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_KR and b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_KR differ
index 5857b91..ee4a967 100644 (file)
Binary files a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_MX and b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_MX differ
index e330135..5a494e6 100644 (file)
Binary files a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_NZ and b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_NZ differ
index 0fd0d27..424909c 100644 (file)
Binary files a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_PL and b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_PL differ
index 6ec64af..77a8f8f 100644 (file)
Binary files a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_RE and b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_RE differ
index 0836187..1dbb03b 100644 (file)
Binary files a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_SG and b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_SG differ
index 3db0e26..6aa7414 100644 (file)
Binary files a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_US and b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_US differ
index b9da104..50db378 100644 (file)
Binary files a/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_YT and b/java/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_YT differ