Skip to content

Commit 08e6d2c

Browse files
committed
Merge metadata updates from upstream r579
1 parent ab2d4c5 commit 08e6d2c

3 files changed

Lines changed: 109 additions & 57 deletions

File tree

resources/PhoneNumberAlternateFormats.xml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,10 @@
748748
</leadingDigits>
749749
<format>$1 $2 $3 $4</format>
750750
</numberFormat>
751+
<numberFormat pattern="(8\d{2})(\d{6})(\d{2})(\d{1,4})">
752+
<leadingDigits>800</leadingDigits>
753+
<format>$1 $2 $3 $4</format>
754+
</numberFormat>
751755
<numberFormat pattern="(\d{3})(\d)(\d{3})(\d{3,4})">
752756
<leadingDigits>
753757
180|
@@ -846,5 +850,29 @@
846850
</numberFormat>
847851
</availableFormats>
848852
</territory>
853+
854+
<!-- Portugal (PT) -->
855+
<territory countryCode="351" >
856+
<availableFormats>
857+
<!-- Lisbon/Porto numbers are usually formatted with the 21 or 22 separated - but sometimes
858+
they are formatted as 21X or 22X. -->
859+
<numberFormat pattern="(2\d{2})(\d{3})(\d{3})">
860+
<leadingDigits>2[12]</leadingDigits>
861+
<format>$1 $2 $3</format>
862+
</numberFormat>
863+
<!-- Commonly used mobile formatting pattern. -->
864+
<numberFormat pattern="(9\d)(\d{3})(\d{4})">
865+
<leadingDigits>9</leadingDigits>
866+
<format>$1 $2 $3</format>
867+
</numberFormat>
868+
<numberFormat pattern="(\d{2})(\d{3})(\d{2})(\d{2})">
869+
<leadingDigits>
870+
2[12]|
871+
9
872+
</leadingDigits>
873+
<format>$1 $2 $3 $4</format>
874+
</numberFormat>
875+
</availableFormats>
876+
</territory>
849877
</territories>
850878
</phoneNumberMetadata>

resources/PhoneNumberMetaData.xml

Lines changed: 79 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -2602,8 +2602,9 @@
26022602
<fixedLine>
26032603
<!-- The prefix 50 48 has been added based on numbers found online, while 40 49 has been
26042604
deleted since we haven't found any numbers with this prefix and it is not mentioned in
2605-
the onatel document. Note the most recent ITU document seems to have major errors in
2606-
the fixed-line table, so we have not changed our patterns based on this. -->
2605+
the Onatel document.
2606+
IMPORTANT: Note that the ITU documents of Mar/Apr 2013 seem to have major errors in the
2607+
fixed-line table, so we have not changed our patterns based on these. -->
26072608
<nationalNumberPattern>
26082609
(?:
26092610
20(?:
@@ -2677,6 +2678,7 @@
26772678
<numberFormat pattern="(\d{2})(\d{3})(\d{2,3})">
26782679
<leadingDigits>
26792680
[356]|
2681+
4[124-7]|
26802682
7[1-9]|
26812683
8[1-6]|
26822684
9[1-7]
@@ -2986,8 +2988,9 @@
29862988
<!-- There seems to be some overlap with phone numbers from Saint Martin and Guadeloupe. The
29872989
national numbering plan does not specify any St Barthélemy-specific numbering prefixes, but
29882990
it appears from searches in online white and yellow pages that a subset of the prefixes
2989-
available in Guadeloupe are used. In these cases, if getRegionCodeForNumber is used, one of
2990-
these region codes will be returned, although numbers will be valid for both regions. -->
2991+
available in these regions are used. In these cases, if getRegionCodeForNumber is used, one
2992+
of these region codes will be returned, although numbers will be valid for both regions.
2993+
-->
29912994
<!-- http://www.itu.int/oth/T0202000058/en -->
29922995
<territory id="BL" countryCode="590" internationalPrefix="00" nationalPrefix="0">
29932996
<!-- Formatting rules borrowed from Guadeloupe. -->
@@ -3006,16 +3009,17 @@
30063009
<exampleNumber>590271234</exampleNumber>
30073010
</fixedLine>
30083011
<mobile>
3012+
<!-- Any ranges assigned from
3013+
http://www.arcep.fr/index.php?id=interactivenumeros have been listed as belonging to
3014+
Guadeloupe, St Martin and St Barthélemy, since we can't reliably distinguish between
3015+
them. -->
30093016
<nationalNumberPattern>
30103017
690(?:
3011-
10|
3012-
2[27]|
3013-
66|
3014-
77|
3015-
8[78]
3018+
0[0-7]|
3019+
[1-9]\d
30163020
)\d{4}
30173021
</nationalNumberPattern>
3018-
<exampleNumber>690221234</exampleNumber>
3022+
<exampleNumber>690301234</exampleNumber>
30193023
</mobile>
30203024
<!-- http://www.comstbarth.fr/urgences.asp -->
30213025
<emergency>
@@ -4046,13 +4050,13 @@
40464050
</numberFormat>
40474051
<numberFormat pattern="([89]\d{2})(\d{3})(\d{3})">
40484052
<leadingDigits>
4049-
8[0-259]|
4053+
8[0-2459]|
40504054
9
40514055
</leadingDigits>
40524056
<format>$1 $2 $3</format>
40534057
</numberFormat>
40544058
<numberFormat pattern="(\d{2})(\d{2})(\d{3})">
4055-
<leadingDigits>8[48]</leadingDigits>
4059+
<leadingDigits>88</leadingDigits>
40564060
<format>$1 $2 $3</format>
40574061
</numberFormat>
40584062
<numberFormat pattern="(\d{2})(\d{5})">
@@ -4079,13 +4083,16 @@
40794083
<exampleNumber>1234567</exampleNumber>
40804084
</fixedLine>
40814085
<mobile>
4082-
<!-- According to IR-21 CCT 20081024.doc CCT for Congo has ranges 84\d{5} and 85\d{7}. We
4083-
are following this rather than the ITU document ranges for CCT. Similarly, for numbers
4084-
with the prefix 88, only 5 subsequent digits can be found. -->
4086+
<!-- As of May'13 the 88 range looks as if it is defunct. The ITU document lists "Yozma
4087+
Timeturns" as the operator, but their website (http://www.ytt.cd) is offline and the
4088+
holdings company http://www.timeturnsholdings.com/products does not show a link for
4089+
DRC. While there are still numbers of the form "88\d{5}" online, none of the ones
4090+
tried were valid. If the holdings company does not respond to requests about this
4091+
range and unless we receive further information, we will remove this range. -->
40854092
<nationalNumberPattern>
40864093
8(?:
4087-
[0-259]\d{2}|
4088-
[48]
4094+
[0-2459]\d{2}|
4095+
8
40894096
)\d{5}|
40904097
9[7-9]\d{7}
40914098
</nationalNumberPattern>
@@ -5726,7 +5733,8 @@
57265733
<leadingDigits>3</leadingDigits>
57275734
<format>$1 $2</format>
57285735
</numberFormat>
5729-
<numberFormat pattern="(800)(\d{7,10})">
5736+
<!-- Note: this is getting ridiculous! How can we format these better? -->
5737+
<numberFormat pattern="(800)(\d{7,12})">
57305738
<leadingDigits>800</leadingDigits>
57315739
<format>$1 $2</format>
57325740
</numberFormat>
@@ -5825,9 +5833,10 @@
58255833
[1-9]\d
58265834
)\d{3,10}|
58275835
9(?:
5828-
0[6-9]|
5829-
[1-9]\d
5830-
)\d{3,10}
5836+
0[6-9]\d{3,10}|
5837+
1\d{4,12}|
5838+
[2-9]\d{4,11}
5839+
)
58315840
</nationalNumberPattern>
58325841
<exampleNumber>30123456</exampleNumber>
58335842
</fixedLine>
@@ -5860,8 +5869,8 @@
58605869
<exampleNumber>16412345</exampleNumber>
58615870
</pager>
58625871
<tollFree>
5863-
<nationalNumberPattern>800\d{7,10}</nationalNumberPattern>
5864-
<possibleNumberPattern>\d{10,13}</possibleNumberPattern>
5872+
<nationalNumberPattern>800\d{7,12}</nationalNumberPattern>
5873+
<possibleNumberPattern>\d{10,15}</possibleNumberPattern>
58655874
<exampleNumber>8001234567890</exampleNumber>
58665875
</tollFree>
58675876
<premiumRate>
@@ -8328,6 +8337,7 @@
83288337
<!-- French Guiana (French Dept. of) -->
83298338
<!-- http://www.itu.int/oth/T020200004C/en -->
83308339
<!-- http://www.arcep.fr/index.php?id=2137&bloc=0594&CMD=RESULTS_NUMEROTATION -->
8340+
<!-- http://www.arcep.fr/uploads/tx_gsavis/11-1297.pdf -->
83318341
<!-- Using a national prefix here as online numbers are formatted with it. -->
83328342
<territory id="GF" countryCode="594" internationalPrefix="00"
83338343
nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG">
@@ -8359,9 +8369,8 @@
83598369
694(?:
83608370
[04][0-7]|
83618371
1[0-5]|
8362-
2[0-46-9]|
8363-
38|
8364-
9\d
8372+
3[018]|
8373+
[29]\d
83658374
)\d{4}
83668375
</nationalNumberPattern>
83678376
<exampleNumber>694201234</exampleNumber>
@@ -8868,6 +8877,7 @@
88688877

88698878
<!-- Guadeloupe -->
88708879
<!-- http://www.itu.int/oth/T0202000058/en -->
8880+
<!-- http://www.arcep.fr/index.php?id=interactivenumeros - ZABPQ-ZNE.xls -->
88718881
<territory id="GP" countryCode="590" internationalPrefix="00"
88728882
mainCountryForCode="true" nationalPrefix="0"
88738883
nationalPrefixFormattingRule="$NP$FG">
@@ -8881,35 +8891,31 @@
88818891
<possibleNumberPattern>\d{9}</possibleNumberPattern>
88828892
</generalDesc>
88838893
<fixedLine>
8884-
<!-- The plan says 59011 and 59012 are not implemented yet, but is from 2006 and online
8885-
examples can be found. -->
88868894
<nationalNumberPattern>
88878895
590(?:
8888-
1[12]|
8896+
0[13468]|
8897+
1[012]|
88898898
2[0-68]|
88908899
3[28]|
8891-
4[126-8]|
8892-
5[067]|
8893-
6[018]|
8894-
[89]\d
8900+
4[0-8]|
8901+
5[579]|
8902+
6[0189]|
8903+
70|
8904+
8[0-689]|
8905+
9\d
88958906
)\d{4}
88968907
</nationalNumberPattern>
88978908
<exampleNumber>590201234</exampleNumber>
88988909
</fixedLine>
88998910
<mobile>
8900-
<!-- Adding 1[1-9] and 2[013-5] as prefixes after SMSs have been successfully sent to
8901-
numbers with this prefix. starpy.net/rates.php also attributes this range to Guadeloupe
8902-
Digicel Mobile. -->
8911+
<!-- Any ranges assigned from
8912+
http://www.arcep.fr/index.php?id=interactivenumeros have been listed as belonging to
8913+
Guadeloupe, St Martin and St Barthélemy, since we can't reliably distinguish between
8914+
them. -->
89038915
<nationalNumberPattern>
89048916
690(?:
8905-
00|
8906-
1[1-9]|
8907-
2[013-5]|
8908-
[3-5]\d|
8909-
6[0-57-9]|
8910-
7[1-6]|
8911-
8[0-6]|
8912-
9[09]
8917+
0[0-7]|
8918+
[1-9]\d
89138919
)\d{4}
89148920
</nationalNumberPattern>
89158921
<exampleNumber>690301234</exampleNumber>
@@ -14931,6 +14937,10 @@
1493114937
</mobile>
1493214938
<premiumRate>
1493314939
<!-- Telemedia service is listed under premium rate. -->
14940+
<!-- Note that as of March 2013, the ITU document talks about the withdrawal of the range
14941+
(90) 0 XXX XXX. This is a 9 digit range and one we have never supported, but this could
14942+
be a mistake in the ITU document and refer to (90) 0XX XXX. However as this is unclear
14943+
at the moment, we decided to leave the (90) range unchanged for now. -->
1493414944
<nationalNumberPattern>90\d{6}</nationalNumberPattern>
1493514945
<possibleNumberPattern>\d{8}</possibleNumberPattern>
1493614946
<exampleNumber>90123456</exampleNumber>
@@ -15645,6 +15655,7 @@
1564515655
[089]\d
1564615656
)|
1564715657
7(?:
15658+
67|
1564815659
7[47-9]|
1564915660
[89]\d
1565015661
)
@@ -15918,6 +15929,7 @@
1591815929

1591915930
<!-- Saint-Martin, French Antilles -->
1592015931
<!-- http://www.itu.int/oth/T0202000058/en -->
15932+
<!-- http://www.arcep.fr/index.php?id=interactivenumeros - ZABPQ-ZNE.xls -->
1592115933
<territory id="MF" countryCode="590" internationalPrefix="00" nationalPrefix="0">
1592215934
<!-- Formatting rules borrowed from Guadeloupe. -->
1592315935
<generalDesc>
@@ -15927,25 +15939,26 @@
1592715939
<fixedLine>
1592815940
<nationalNumberPattern>
1592915941
590(?:
15930-
10|
15931-
2[79]|
15932-
5[128]|
15942+
[02][79]|
15943+
13|
15944+
5[0-268]|
1593315945
[78]7
1593415946
)\d{4}
1593515947
</nationalNumberPattern>
1593615948
<exampleNumber>590271234</exampleNumber>
1593715949
</fixedLine>
1593815950
<mobile>
15951+
<!-- Any ranges assigned from
15952+
http://www.arcep.fr/index.php?id=interactivenumeros have been listed as belonging to
15953+
Guadeloupe, St Martin and St Barthélemy, since we can't reliably distinguish between
15954+
them. -->
1593915955
<nationalNumberPattern>
1594015956
690(?:
15941-
10|
15942-
2[27]|
15943-
66|
15944-
77|
15945-
8[78]
15957+
0[0-7]|
15958+
[1-9]\d
1594615959
)\d{4}
1594715960
</nationalNumberPattern>
15948-
<exampleNumber>690221234</exampleNumber>
15961+
<exampleNumber>690301234</exampleNumber>
1594915962
</mobile>
1595015963
<!-- http://www.leshotelsdesaintmartin.com/fr/saint-martin-antilles/informations-saint-martin/infos-pratiques-sxm.html -->
1595115964
<emergency>
@@ -19787,7 +19800,18 @@
1978719800
<!-- http://www.anacom.pt/render.jsp?categoryId=279098 -->
1978819801
<territory id="PT" countryCode="351" internationalPrefix="00">
1978919802
<availableFormats>
19803+
<!-- Note: the wikipedia page suggests that mobile numbers may also be formatted with only
19804+
two digits in the first group; however, this doesn't seem to be majority usage based on
19805+
searches online. -->
19806+
<numberFormat pattern="(2\d)(\d{3})(\d{4})">
19807+
<leadingDigits>2[12]</leadingDigits>
19808+
<format>$1 $2 $3</format>
19809+
</numberFormat>
1979019810
<numberFormat pattern="([2-46-9]\d{2})(\d{3})(\d{3})">
19811+
<leadingDigits>
19812+
2[3-9]|
19813+
[346-9]
19814+
</leadingDigits>
1979119815
<format>$1 $2 $3</format>
1979219816
</numberFormat>
1979319817
</availableFormats>
@@ -22231,7 +22255,7 @@
2223122255
4[1-7]
2223222256
)|
2223322257
3(?:
22234-
3[1-39]|
22258+
3[1-389]|
2223522259
4[1-7]
2223622260
)|
2223722261
4[34][12]
@@ -23494,7 +23518,7 @@
2349423518
</fixedLine>
2349523519
<mobile>
2349623520
<!-- Added 79[5-9] and 707 from online numbers found with this prefix. -->
23497-
<!-- Ranges with prefixes 7[2346] are "not yet operational" as of Jan. 2013. -->
23521+
<!-- Ranges with prefixes 7[46] are "not yet operational" as of Jun. 2013. -->
2349823522
<nationalNumberPattern>
2349923523
7(?:
2350023524
0[0-7]|

resources/PhoneNumberMetaDataForTesting.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
</territory>
4141

4242
<!-- Angola -->
43-
<!-- This country has been coopted to test the case of a national prefix
44-
with a non-numeric symbol in it. -->
43+
<!-- This country has been coopted to test the case of a national prefix with a non-numeric
44+
symbol in it. It is also useful since it has no national prefix formatting rule. -->
4545
<territory id="AO" countryCode="244" internationalPrefix="00" nationalPrefix="0~0">
4646
<availableFormats>
4747
<numberFormat pattern="(\d{3})(\d{3})(\d{3})">

0 commit comments

Comments
 (0)