* It was confusing and unnecessary. Not every country that has short numbers beginning with a 0 had it, and it is not the only digit that could overlap with a national prefix and hence be interpreted incorrectly.
* Make canBeInternationallyDialled_API public in Java and CPP
* update notes in pending_code_changes.txt
* Remove TODO on canBeInternationallyDialled as it is already an public API in JS
* Make JS canBeInternationallyDialled API doc consistent with Java and CPP
* Handling possible out-of-bounds exception that would be thrown in C++
and Java if a number with a phone-context tag is entered (RFC3966
format) but no actual phone context.
Update doc references to refer to CLDR and the page of CLDR codes where
appropriate - it used to say ISO country codes were used, but they aren't.
Also updated to refer to two *or three* letter language codes since they may be three letters (we use the shortest defined one for a language)
Updating comments about leadingDigits field at territory level as well.
* isNumberMatch fix for numbers with italian leading zero fields set. Only
affects people who haven't correctly constructed phone numbers using
methods like 'parse'.
* Adding C++ tests and fixing bug in ExactlySameAs method, which wasn't
updated to handle the number_of_leading_zeros field when that was added
to the phone number proto.
See pending_code_changes.txt for more details.
* Support semicolon as extension character while parsing
* Add notes to pending_code_changes.txt
* JS port: Support semicolon as extension character while parsing
* Update comments in phonenumberutil.js
Metadata changes:
-- Drops the "-1" that was erroneously included in possible lengths before (didn't break anything, but was wrong) - it was a possibleLength of a sub-component so got added to the generalDesc possibleLengths
-- possibleNumberPattern no longer inherited: we don't use this anyway, we will do another CL soon to stop including it at all in the generated metadata
-- exampleNumber is no longer set on fixed-line and mobile elements from the generalDesc
XML file changes:
-- Stopped specifying "NA" and "-1" specifically for fixed-line and mobile blocks; now they are treated as every other type of phone number: if missing, don't fill them in from generalDesc, but leave them missing.
Code changes:
-- Stop using the exampleNumber on generalDesc for non-geo entities, but look at their phonenumber descs - the exampleNumber won't be stored on the generalDesc anymore. This affects porters if they either copied our build logic or used our built metadata in some way; they should update this method in their port too.
Using new possible length information to calculate whether a short
number is the right length or not. This made us realise that the data
was missing for MY; this was added.
Changing PhoneNumberUtil to use the possibleLengths information, not the reg-exes.
Note the API is not changing, but the metadata is now somewhat stricter for
many countries, since before we applied only a minimum and maximum length for
most countries, and now we specify exactly which lengths are possible.
This has a flow-on effect when parsing, since we decide whether to do certain
operations like strip a national prefix based on whether the number is a
possible length before/after - when parsing, if the number is shorter than the *national* pattern, we no longer strip the national prefix.
Affected countries:
AD (7 digits now invalid)
AM (7 digits now invalid)
AR (9 digits now invalid)
AZ (8 digits now invalid)
BG (4 digits now valid for local-only numbers)
BJ (5-7 digits now invalid)
CC/CX (5 digit numbers now possible: this should always have been the case, but the generalDesc was wrong and didn't reflect its child elements. We now calculate it based on them, which allows 5 digit numbers.)
CO (9 digits now invalid)
CR (9 digits now invalid)
ET (8 digits now invalid)
GE (7 and 8 digits now invalid)
GH (8 digits now invalid)
IL (5 and 6 digits now invalid)
IM/JE/GG (7, 8 and 9 digits now invalid, shortest national number length now 10, so parsing affected for numbers shorter than this)
IS (8 digits now invalid)
KG (7,8 digits now invalid)
KR (11 digits now invalid)
LA (7 digits now invalid)
LI (8 digits now invalid)
LY (8 digits now invalid)
MV (8 and 9 digits now invalid)
MW (8 digits now invalid)
MX (9 digits now invalid)
NP (9 digits now invalid)
SE (11 digits now invalid)
SG (9 digits now invalid)
SL (7 digits now invalid)
SM (7-9 digits now invalid)
UA (8 digits now invalid)
UG (8 digits now invalid)
UZ (8 digits now invalid)
- Handling language codes that are not just two-letters long appropriately
- Making file processing deterministic, so this doesn't differ from build to build
- LOGGER -> logger
- Small comment fixes
- Style-guide-recommended formatting changes
- Removal of duplicate, unneeded method in PhoneNumberToTimeZonesMapper.java for canBeGeocoded, using phoneNumberUtil instead.
Sep 19, 2016: libphonenumber-7.7.0
Code changes:
Removed the dependency on protobuf (protobuf-javanano) from the Java library, resurrecting java/libphonenumber/src/com/google/i18n/phonenumbers/Phonemetadata.java which was present until libphonenumber-7.1.1.
Does not affect the C++ or JavaScript libraries.
We remove the dependency on protobuf (protobuf-javanano) from the Java library, resurrecting java/libphonenumber/src/com/google/i18n/phonenumbers/Phonemetadata.java which was present until libphonenumber-7.1.1.
Does not affect the C++ or JavaScript libraries.
Code changes:
* Phonemetadata.java has two more fields to represent possible lengths of phone numbers. Changed BuildMetadataFromXml (and the resultant jar) to alter the way that metadata about possible-lengths information is consumed when constructing metadata to populate these. Discussion list email: https://groups.google.com/forum/#!topic/libphonenumber-discuss/75TOpTFVi08
Metadata changes:
* Updated phone metadata for region code(s): AG, AM, AX, BY, CD, FI, IN, KR, MA, NA, NL, PK, SY
* Updated short number metadata for region code(s): BR, GB, NL, NZ
* New geocoding data for country calling code(s): 82 (pl, pt, ro, ru, sl, sr, uk, vi)
* Updated carrier data for country calling code(s): 27 (en), 91 (en), 243 (en), 963 (en)