Keying Phone Numbers

On the web are tens of thousands of forms that ask you for a phone number. Each programmer has his own idea of what constitutes the valid format e.g. 1+(250)555-2525x1234. Some want just digits. Some want dashes. Some want spaces. Some want parentheses around the area code, some do not. Some want a lead 1+ or 1- or just plain 1 for the country code. Some insist you leave out the country code. Some want the extension keyed as a separate field. Some want it included in the phone number tacked on the end. The user has to, by experiment, guess which form this particular programmer likes. Screw em!

The programmer should just strip the punctuation then insert it back the way he likes and not chastise the user for doing it a different way from his favourite. Americans don’t seem to understand that Swedes insert parentheses and spaces in their phone numbers in a variable way that requires a table of rules e.g. +46 (0)18 50 44 00. Indians format their phone numbers in yet a different way with STD (Subscriber Trunk Dialling (India)) codes e.g. +91 (44) 4359 6111. On the net, you get visitors from everywhere, so it is probably best to just leave the number in the format the customer keyed it unless you are prepared for some heavy duty internationalisation.

~ Roedy (1948-02-04 age:70)