Skip to content

9.0.41.0

Choose a tag to compare

@landrix landrix released this 23 Oct 05:01
· 2 commits to main since this release

libphonenumber-pascal 9.0.41.0: the pure Object Pascal port of Google's
libphonenumber for Delphi and
FreePascal, built from upstream metadata release 9.0.41.

New version scheme

From this release on, the version names the upstream metadata release it is
built from, plus a fourth part for releases of the port alone:

version meaning
X.Y.Z.0, e.g. 9.0.42.0 the first release on upstream metadata X.Y.Z
X.Y.Z.1, X.Y.Z.2, ... fixes or features of the port, metadata unchanged

The first release, 0.1.0, predates the scheme and already carried metadata
9.0.41; 9.0.41.0 is the first release under the scheme and contains
everything since.

What is new since 0.1.0

  • The facade takes a parsed number, as upstream does:
    TPhoneNumberUtil.IsValidNumber(Number), IsValidNumberForRegion,
    GetNumberType, GetRegionCodeForNumber, IsPossibleNumber,
    IsPossibleNumberWithReason, IsPossibleNumberForType(WithReason) and
    CanBeInternationallyDialled.
  • Two parse driver steps are public
    (MaybeStripInternationalPrefixAndNormalize, TryMaybeExtractCountryCode),
    and the two upstream tests that call them are ported.
  • Fixes, both toward upstream behaviour: an empty international prefix is a
    zero length match (affects only territories without one: the
    non-geographical entities and CO of the upstream test metadata; production
    parse results are unchanged); the regex layer rejects a caller pattern that
    would break out of its internal wrapping (e.g. )|(), like
    java.util.regex does.
  • Documentation: a new user guide
    (installation for Delphi and Lazarus, every task with examples, a Java/C# to
    Pascal mapping, FAQ), a README written for users, and
    samples
    • one small program per task, each with an expected output that CI checks
      on Delphi and FreePascal.
  • Tooling: the FreePascal gates also run on FreePascal 3.2.2 by default,
    and a weekly job opens an issue when upstream publishes a new release.

The full list is in the
CHANGELOG.

Compatibility

Every 0.1.0 call still compiles; the new overloads only add to the API. With
the production metadata, results are unchanged. The one behaviour change is
for malformed regular expressions a caller passes in (for example a user
format of FormatByPattern): a pattern that breaks out of the wrapping is now
rejected like any other compile error instead of matching. Delphi 13 (Win64) and FreePascal 3.2.2, 3.2.4
and 3.3.1 are tested.