How to cannonicate numbers in international form

Stephen Shelton stephen at
Fri Jul 18 01:40:02 CEST 2008

On Thu, Jul 17, 2008 at 04:30:37PM -0300, Werner Almesberger wrote:

Forgive me if I'm oversimplifying or disregarding technical details here, but
perhaps my highly conceptual approach might be helpful. 

The approach I would take would rely on distilling a finite list of phone number
formats (which could be customizable in such event that a user doesn't like one
or needs to add his own.) This format would encapsulate details such as:

1) what are the minimum sets of digits required to describe a phone number?
(this could be multiple values...)

2) what is implied when information is missing? (this could be auto populated
for the user so that it is no longer ambiguous, or could just simply be implied.)

3) what is the preferred way of displaying a phone number? (this may be map 
of [amount of information inputed] and [preferred way of displaying it].)

The user of the device would be expected to provide his default locale (or 
perhaps this could be derived from the service provider). This default would be
assumed in the general case.

Each contact, or phone number when dialed, would be assumed to be in this
default locale, but could be further specified, in which case it would follow
the behavior of that locale as described above.

This leaves two distinct ambiguities:

1) A phone number is inputed that could be either the default locale or any
number of other locales. I would opt here for a simple boolean dialogue asking 
"would you like to treat this phone number according to your default locale?" 
with a "do not ask again" option. 

2) A phone number is inputed that is both ambiguous and not the default locale.
A series of matching locales could be derived and presented to the user in this
case as a drop down/radio box type select. This option could even be remembered
in some fashion (if a number matches this form, assume this locale.) It may make
sense here for an alternate "attempt dial as-is" option.

Again, sorry if I've missed the boat here, but hopefully this is some food for

Stephen Shelton
stephen at

More information about the devel mailing list