title: Handling phone numbers properly (storing, ideally using a unique form)
body: <p>This question is not specific to Android but I have included the tag.</p>
  
  <p>I need to be able to store phone numbers in some sort of standard form (ideally a string) where equality can be tested/evaluated quickly (hence a string would be ideal)</p>
  
  <p>I found some answers already, the best ones pointed to <a href="http://developer.android.com/reference/android/telephony/PhoneNumberUtils.html" rel="nofollow noreferrer">http://developer.android.com/reference/android/telephony/PhoneNumberUtils.html</a> (I'm fine with using a library to do it for me)</p>
  
  <p>BUT this isn't really good enough, I've tried a variety of format numbers, learnt about the Editable factory to use some of the static methods in that class, but they don't seem to return the form I was expecting.</p>
  
  <p>I was expecting something like a phone-number-hash, that two inputs <strong>representing</strong> the same number would yield the same in this "standard form" and that one could dial this standard form and be fine. I thought that all the various +s and whatnot would be short-hands for this standard form.</p>
  
  <p>I'm not sure if such a thing exists now.</p>
  
  <p>I understand that some things mean "current area" (or country) which is why land-lines can ommit area codes, I expected a function that would return the format for the current location (but this doesn't apply to mobiles, if it were a land line to prepend the area code for example, this would be (closer) to the "standard form" I keep assuming exists)</p>
  
  <p>I am pretty sure that some full-form for phone numbers exists, thinking about how the telephone system works (which I infer I admit) there ought to be a form that identifies a number uniquely across the whole planet, and when this is not the case (such as local calls from land-lines without area codes) it is an optimisation.</p>
  
  <p>So I have two questions:</p>
  
  <p>How can I "expand" a phone number to a unique string for that number, such that any alternate forms of writing that number (with spaces, an 0 or +44....) "expand" to this unique number?</p>
  
  <p>Are there any ISO(/IEC?) (what's the O stand for?) standard documents with drafts open to the public? I've read the Wikipedia page (ages ago, I've spent so many hours wiki-browsing, and opened hundreds of tabs) but it covers history, or some information on formatting), I'd like to know more about the thing I've taken for granted now for some 8 years or so.</p>
  
  <p>Additionally, why is Windows Phone 8 a tag? To make the 12 proud Lumina owners not feel left out? (It was suggested as a tag!)</p>
  
  <p><strong>Addendum</strong></p>
  
  <p>Unfortunately <a href="https://stackoverflow.com/questions/4742464/any-api-in-android-to-normalize-phone-number">Any API in android to normalize phone number</a> there are no solutions there (this includes libphonenumber) and my quest to find out has lead to some interesting reads:</p>
  
  <p><a href="http://en.wikipedia.org/wiki/Panel_switch" rel="nofollow noreferrer">http://en.wikipedia.org/wiki/Panel_switch</a></p>
  
  <p><a href="http://en.wikipedia.org/wiki/Nonblocking_minimal_spanning_switch" rel="nofollow noreferrer">http://en.wikipedia.org/wiki/Nonblocking_minimal_spanning_switch</a></p>
  
  <p><a href="http://en.wikipedia.org/wiki/Telephone_exchange" rel="nofollow noreferrer">http://en.wikipedia.org/wiki/Telephone_exchange</a></p>
  
  <p>and I still cannot conclude there isn't some "full form" for numbers. </p>
  
  <p>I dare not create a solution that simply swaps +44 for an 0 and such.</p>