diff --git a/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1431_en b/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1431_en new file mode 100644 index 000000000..412c0099c Binary files /dev/null and b/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1431_en differ diff --git a/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1669_en b/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1669_en new file mode 100644 index 000000000..b3bf8a03f Binary files /dev/null and b/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1669_en differ diff --git a/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1873_en b/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1873_en new file mode 100644 index 000000000..78e7da117 Binary files /dev/null and b/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1873_en differ diff --git a/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/config b/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/config index 1f71c4131..97f51e989 100644 Binary files a/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/config and b/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/config differ diff --git a/java/libphonenumber/src/com/google/i18n/phonenumbers/CountryCodeToRegionCodeMap.java b/java/libphonenumber/src/com/google/i18n/phonenumbers/CountryCodeToRegionCodeMap.java index 922ab6dbc..7c8cf06b7 100644 --- a/java/libphonenumber/src/com/google/i18n/phonenumbers/CountryCodeToRegionCodeMap.java +++ b/java/libphonenumber/src/com/google/i18n/phonenumbers/CountryCodeToRegionCodeMap.java @@ -31,10 +31,10 @@ public class CountryCodeToRegionCodeMap { // countries sharing a calling code, such as the NANPA countries, the one // indicated with "isMainCountryForCode" in the metadata should be first. static Map> getCountryCodeToRegionCodeMap() { - // The capacity is set to 281 as there are 211 different country codes, + // The capacity is set to 282 as there are 212 different country codes, // and this offers a load factor of roughly 0.75. Map> countryCodeToRegionCodeMap = - new HashMap>(281); + new HashMap>(282); ArrayList listWithRegionCode; @@ -807,6 +807,10 @@ public class CountryCodeToRegionCodeMap { listWithRegionCode.add("LA"); countryCodeToRegionCodeMap.put(856, listWithRegionCode); + listWithRegionCode = new ArrayList(1); + listWithRegionCode.add("001"); + countryCodeToRegionCodeMap.put(870, listWithRegionCode); + listWithRegionCode = new ArrayList(1); listWithRegionCode.add("BD"); countryCodeToRegionCodeMap.put(880, listWithRegionCode); diff --git a/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_870 b/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_870 new file mode 100644 index 000000000..2e8834e3b Binary files /dev/null and b/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_870 differ diff --git a/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CA b/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CA index ca99fc0be..196049898 100644 Binary files a/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CA and b/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CA differ diff --git a/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CI b/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CI index 5598d7fb6..857e66b32 100644 Binary files a/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CI and b/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CI differ diff --git a/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EG b/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EG index 16582aa08..89b83ded7 100644 Binary files a/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EG and b/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EG differ diff --git a/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HK b/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HK index 0b3561a80..cab9953f5 100644 Binary files a/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HK and b/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HK differ diff --git a/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IN b/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IN index 15576b093..529d46954 100644 Binary files a/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IN and b/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IN differ diff --git a/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IR b/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IR index 5383277b4..5af5d8698 100644 Binary files a/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IR and b/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IR differ diff --git a/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LB b/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LB index 6b2dba9cb..e8b1b4bee 100644 Binary files a/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LB and b/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LB differ diff --git a/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MA b/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MA index bf444b7fb..9de2932ff 100644 Binary files a/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MA and b/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MA differ diff --git a/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ME b/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ME index 14dbe77f0..949f45007 100644 Binary files a/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ME and b/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ME differ diff --git a/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MM b/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MM index 6074b5af3..e0eb9f87c 100644 Binary files a/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MM and b/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MM differ diff --git a/java/release_notes.txt b/java/release_notes.txt index 87b6c0949..8a61a9dd0 100644 --- a/java/release_notes.txt +++ b/java/release_notes.txt @@ -1,3 +1,9 @@ +May 8th, 2012: libphonenumber-4.8.1 +* Metadata update only: + - CA, CI, EG, HK, IN, IR, LB, MA, ME, MM + - Non-geographical entity with calling code 870 (Inmarsat) + - Geocoding updates for country calling codes 1 for new area codes + April 24th, 2012: libphonenumber-4.8 * Functionality changes - RFC format now outputs a number starting with "tel:" diff --git a/resources/PhoneNumberMetaData.xml b/resources/PhoneNumberMetaData.xml index 1e7c9c169..845d06143 100644 --- a/resources/PhoneNumberMetaData.xml +++ b/resources/PhoneNumberMetaData.xml @@ -17,8 +17,9 @@ MetaData on Phone Number Plan and formatting rules Note: Territories are in alphabetical order by their IDs, which are based on ISO 3166-1 - two-letter country codes. The country names in the comments are the official short names - in English according to ISO 3166-1. + two-letter country codes (or are set to "001" for non-geographical entities, which + represents "World" in the UN M.49 standard). The country names in the comments are the + official short names in English according to ISO 3166-1. For more information on what each element represents, see java/com/google/i18n/phonenumbers/phonemetadata.proto @@ -29,6 +30,9 @@ hence only basic validation rules (numbers should be between 3 and 15 digits long) will be applied. + If adding an element for a non-geographical entity, please add an example number element to the + general description. + Country code, international and national prefix information main source: http://www.itu.int/pub/T-SP-E.164C-2011 @@ -3610,7 +3614,7 @@ 4(?: 03| 1[68]| - 38| + 3[18]| 5[06] )| 5(?: @@ -3632,6 +3636,7 @@ 8(?: [06]7| 19| + 73 )| 90[25] )[2-9]\d{6}| @@ -3655,7 +3660,7 @@ 4(?: 03| 1[68]| - 38| + 3[18]| 5[06] )| 5(?: @@ -3677,6 +3682,7 @@ 8(?: [06]7| 19| + 73 )| 90[25] )[2-9]\d{6} @@ -4032,12 +4038,12 @@ 21234567 - + (?: 0[1-9]| - 4[04-9]| + 4[0-24-9]| 5[057-9]| 6[05679] )\d{6} @@ -6132,9 +6138,7 @@ 1(?: - 0[0169]| - 1[124]| - 2[0-278]| + [012]| 5[0-2] )| [89]00 @@ -6207,11 +6211,11 @@ 234567890 - + 1(?: - 0[0169]| + 0[01269]| 1[124]| 2[0-278] )\d{7} @@ -8142,7 +8146,6 @@ 302345678 - (?: 2[034678]| @@ -8991,7 +8994,7 @@ - + @@ -9012,6 +9015,10 @@ 900 $1 $2 $3 $4 + + 900 + $1 $2 + + overlap. Extra prefixes added: 7277, 730[124-689], 735[0-24-8], 738[0-57], 740[34679], + 750[679], 7796, 787[34], 7896, 810[1-358], 811[56], 812[02569], 814[01], 8171, 8179, + 822[1-689], 823[0-24-9], 826[0-35-7], 827[0137-9], 828[01], 829[0-2479], the ranges in + 83X excepting 830[037], 834[14] and 8390, 840[02-57-9], 842[24-689], 843[0-59], + 844[0-489], 845[0-24-689], 846[09], 847[0135], 848[0-8], 850[7-9], 8510, 852[02-589], + 8530, 854[47], 8559, 856[0-5], 8586, 859[57], 860[1259], 8649, 865[03-79], 867[0-59], + 868[349], 869[0-46], 872[013-9], 8749, 875[1-35-9], 876[0-47], 879[4589], 881[05], + 8824, 8859, 892[67], 894[6-8], 896[3-6]. --> (?: 7(?: @@ -10618,21 +10642,20 @@ 9[389] )| 3(?: - 0[13-9]| - 5[0-4789]| + 0[1-9]| + [58]\d| 7[3679]| - 8[1-9]| 9[689] )| 4(?: - 0[1-5789]| + 0[1-9]| 1[15-9]| [29][89]| 39| 8[389] )| 5(?: - 0[0-5789]| + 0\d| [47]9| [25]0| 6[6-9]| @@ -10679,8 +10702,8 @@ 2(?: [2369]\d| 52| - 7[01357]| - 8[567] + 7[0135789]| + 8[01567] )| 3(?: 0[0235-8]| @@ -10695,14 +10718,14 @@ )| 5(?: 0[07-9]| - 11| + 1[01]| [26]\d| 30| 4[47]| 5[39]| 7[45]| - 85| - 9[015] + 8[56]| + 9[0157] )| 6(?: [0589]\d| @@ -10717,18 +10740,17 @@ )| 8(?: [07-9]\d| - 17| + 1[057]| 2[024-8]| 44| 5[3589]| 6[0167] )| 9(?: - [057-9]\d| + [05-9]\d| 2[35-9]| 3[019]| - 4[036-8]| - 6[0-46-9] + 4[036-8] ) )| 9\d{3} @@ -10880,7 +10902,7 @@ [2-6]\d{4,9}| 9(?: - [134]\d{8}| + [1-4]\d{8}| 9\d{2,8} )| [178]\d{9} @@ -10921,9 +10943,10 @@ )| 2(?: 2[189]| - [3689][12]| + [389][12]| 42| 5[256]| + 6[1-59]| 7[34] )| 3(?: @@ -10976,19 +10999,18 @@ 9(?: 1(?: [039]\d| - 1[1-36-9]| + [16][1-35-9]| 2[1-8]| - 4[01346-9]| - 5[13-9]| - 6[1-35-9]| - 7[1-9]| - 8[1346-9] + 4[013-9]| + [57][1-9]| + 8[13-9] )| + 2[01]\d| 3(?: + [035-9]\d| 13| 2[1-579]| - 47| - [5-9]\d + 47 ) )\d{6} @@ -13943,8 +13965,9 @@ [13-6]| 7(?: - [2-57-9]| - 62)| + [2-579]| + 62| + 8[0-7])| [89][2-9] $1 $2 $3 @@ -13954,7 +13977,8 @@ [89][01]| 7(?: [01]| - 6[013-9]) + 6[013-9]| + 88) $1 $2 $3 @@ -13968,8 +13992,9 @@ (?: [14-6]\d{2}| 7(?: - [2-57-9]\d| - 62)| + [2-579]\d| + 62| + 8[0-7])| [89][2-9]\d )\d{4} @@ -13982,7 +14007,8 @@ 3\d| 7(?: [01]\d| - 6[013-9] + 6[013-9]| + 88 ) )\d{5} @@ -14909,15 +14935,15 @@ 520123456 - + 6(?: 0[0-6]| [14-7]\d| 2[23679]| 3[03458]| - 80| + 8[01]| 99 )\d{6} @@ -15237,7 +15263,7 @@ - 78[134579]\d{5} + 78[1-9]\d{5} \d{8} 78108780 @@ -15589,7 +15615,16 @@ $1 $2 $3 - 9[24-9] + + 9(?: + [25-9]| + 4[1349] + ) + + $1 $2 $3 + + + 94[0256] $1 $2 $3 @@ -15598,10 +15633,11 @@ [124-8]\d{5,7}| 9(?: [25689]| - [47]\d + 4\d{1,2}| + 7\d )\d{6} - \d{5,9} + \d{5,10} 9(?: [25689]| - [47]\d + 4(?: + [0256]\d| + [1349] + )| + 7\d )\d{6} - \d{8,9} + \d{8,10} 92123456 @@ -24596,6 +24636,35 @@ + + + + + + + $1 $2 $3 + + + + [35-7]\d{8} + \d{9} + 301234567 + + + NA + NA + + + + + (?: + [356]\d| + 7[6-8] + )\d{7} + + + + diff --git a/resources/geocoding/en/1.txt b/resources/geocoding/en/1.txt index aef3b8e14..5ebef410d 100644 --- a/resources/geocoding/en/1.txt +++ b/resources/geocoding/en/1.txt @@ -10651,6 +10651,7 @@ 1425957|Bellevue, WA 1425990|Bellevue, WA 1430|Texas +1431|Manitoba 1432|Texas 1432218|Midland, TX 1432229|Presidio, TX @@ -18966,6 +18967,7 @@ 1662983|Bruce, MS 1662993|Ripley, MS 1667|Maryland +1669|California 1678|Georgia 1678289|Stockbridge, GA 1678297|Alpharetta, GA @@ -27336,6 +27338,7 @@ 1870974|Jonesboro, AR 1870994|Ash Flat, AR 1872|Chicago, IL +1873|Quebec 1878|Pennsylvania 1888988|Anaheim, CA 1901|Tennessee