[whatwg] Changing punctuation value of input element in telephone state

Ashley Sheridan wrote:
> On Wed, 2010-04-07 at 01:28 +0200, Eduard Pascual wrote:
> 
>> On Wed, Apr 7, 2010 at 1:10 AM, Ian Hickson <ian at hixie.ch> wrote:
>>> If there was a true standard, then the spec would refer to that, but as
>>> you say, it's very varied in practice.
>> There is quite a standard, even if an implicit one: (almost) no punctuation.
>> Have you ever dialed a "(" or a "-" when phoning someone? In essence,
>> phone numbers are sequences of digits, and punctuation is only used as
>> a convenience to enhance readability.
>> There are two exceptions to this: "+" and letters are used as
>> replacement for numbers (the plus sign for the international call
>> code, the letters for specific digits to enable creating "branded"
>> numbers easier to memorize).

I mostly agree. Number grouping and punctuation is part of the
formatting, not real content.

> Phone numbers can also validly include pause characters too. [...]
> 
> Also, not entirely sure, but would asterisks (*) and hashes (#) be
> included too? I was just going on what digits exist on a standard phone
> keypad.

I think that asterisk and hash are required for some internal phone
numbers, though somewhat rare. The "+" sign can usually be replaced with
double zero, but if I've understood correctly, the "+" is technically
different from double zero in the phone network.

There's an extra issue with pauses as far as I know:

US notation (CDMA?):
"," pause for 1 second
"p" pause for 3 seconds

GSM notation:
"p" pause for 3 seconds
"w" wait for any key press, do not transmit the pressed key


In addition to these issues, at least in Finland the traditional
formatting of long distance codes in addition to country codes result in
totally insane formatting. Example:

Local phone number (usual formatting):
1234 567
When dialing, you just press 1234567

With long distance code (still usable inside Finland only):
(012) 1234 567
[traditionally you used the "012" prefix only if "012" was not your own
prefix, it was not possible to use "012" prefix optionally if you lived
in "012" area]
When dialing, you just press 0121234567

And nowadays you will see stuff like this:
+358 (012) 1234 567
This contains the area code for Finland "+358" in addition to the
Finnish "local distance number".
However, there's a catch! When dialing, you must press +358121234567
because the first zero of area code is dropped if there's a country
code. As a result, it's not safe to blindly drop the parenthesis from
user inputted phone number.

Fortunately, it seems that this problem is a self fixing one: younger
generation does not understand the history behind this mess and they
will only know the no-visible-punctuation-characters format so they will
either enter "+358121234567" or "+358 12 123 4567".

In the end, I think that sensible choice would be to specify that
type="tel" is identical to type="text" except that the UA could suggest
phone numbers from the phone book instead of any random input from other
previously inputted text. The UA could even display the name in addition
to the number if it recognizes that the number that user just inputted
is in fact one found in the phone book. I don't think it's currently
internationally safe to automatically change the user input in any way.

-- 
Mikko

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100407/5154d0f6/attachment.pgp>

Received on Wednesday, 7 April 2010 03:49:36 UTC