- From: Marcos Cáceres <notifications@github.com>
- Date: Thu, 25 Jan 2018 02:52:37 +0000 (UTC)
- To: w3c/payment-request <payment-request@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/payment-request/issues/652/360344974@github.com>
@michelle, all.... I spent the last few days researching if E.164 can be a "MUST" requirement in the spec. Sadly, short of standardizing Google's libphonenumber, it doesn't seem doable IMO. There is just too much variance and craziness in phone numbers. Thus, I think all we can do is continue to ask for a "SHOULD" here. Longer... Consider the [variance of the national conventions for phone numbers](https://en.wikipedia.org/wiki/National_conventions_for_writing_telephone_numbers), to silly things, like some German phone numbers being 17 digits long, when E.164 says they should be 15 max 🤪 Then there is a bunch of interesting challenges around internationalized formats including the numbers themselves, the "(", ")" and "[", "]" and "-" and so on. Although those can all be stripped out, one still might end up with an oddball number that starts with multiple "00"s, so then you need to know if the zero should be dropped to put the country prefix on the front, etc. It gets a little scary for me from there, because you start changing the numbers themselves. To cut a long story short, I think it's best to lobby directly here that implementers do phone numbers through libphonumber to *try* to get a E.164 number out (which both Google and Firefox will do, for instance). However, despite the browser's best effort, developers might need to still deal with the possibility of a number not being in E.164 by checking if the first character is a "+", and if not, passing the number and the country to libphonenumber. If others think this might be doable and want to discuss further, I'm happy to discuss further. It's a worthy goal to standardize this stuff, but it seems quite hard... so would require a few of us to do it. I'm closing this - but we can reopen if others are willing to work on the problem together. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/payment-request/issues/652#issuecomment-360344974
Received on Thursday, 25 January 2018 02:53:00 UTC