4 ms·
E.164 format. Every valid number in the world can be represented. The downside is that most people don't even know that this exists, so when doing an internat
by ismarc 17y ago
E.164 format. Every valid number in the world can be represented. The downside is that most people don't even know that this exists, so when doing an international based system, you have a filter based on the country they user is based in and automatically apply any codes needed. Just strip everything out of the field that isn't a number and prepend the country code if the region doesn't normally include it. That means that 210-555-1212 would become 12105551212 for a U.S. number and 21-555-1212 would become 55215551212 for a Brazil number.
- timthorn 17y agoThe transform isn't that simple. For example, UK numbers start with a 0 to indicate STD (long distance) - but that 0 must be stripped for calls from another country. Ie, 01234 567890 is dialed from abroad as +44 1234 567890.
- ismarc 17y agoThis gets into dial semantics vs. number format, which then becomes an element of user behavior. I don't know how user behavior is in a large number of other countries, but the U.S. I know typical reaction to "enter your full phone number" is area code + number, not 1 + area code + number.
- timthorn 17y agoIndeed. In the UK, the zero is always regarded as part of the area code.
- acg 17y agoAdditionally these rules can and do change. For example I know that the national numbering plan in the Czech Republic changed around 2002 for instance so a leading 0 for national calls was removed. Getting all websites in the world to understand changing numbering plans would be quite a feat, and for most sites not worth the effort. http://www.itu.int/itudoc/itu-t/number/c/cze/76045.html http://www.itu.int/itudoc/itu-t/number/c/cze/76045.html