This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28095 - Half the world uses commas instead of periods as decimal separators. How about requiring user-agents to handle both? Details on browser support here:
Summary: Half the world uses commas instead of periods as decimal separators. How abou...
Status: RESOLVED NEEDSINFO
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: https://html.spec.whatwg.org/#number-...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-24 20:34 UTC by contributor
Modified: 2015-08-28 16:02 UTC (History)
6 users (show)

See Also:


Attachments

Description contributor 2015-02-24 20:34:37 UTC
Specification: https://html.spec.whatwg.org/multipage/forms.html
Multipage: https://html.spec.whatwg.org/multipage/#number-state-(type=number)
Complete: https://html.spec.whatwg.org/#number-state-(type=number)
Referrer: https://t.co/FqfygG7rf8

Comment:
Half the world uses commas instead of periods as decimal separators. How about
requiring user-agents to handle both? Details on browser support here:
https://www.aeyoun.com/posts/html5-input-number-localization.html

Posted from: 84.208.125.29
User agent: Mozilla/5.0 (X11; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0 AlexaToolbar/alxf-2.21
Comment 1 Ian 'Hixie' Hickson 2015-03-04 21:38:27 UTC
Why would we want to have two wire formats? I don't understand.
Comment 2 Simon Pieters 2015-03-05 12:05:01 UTC
This seems like a bug on some browsers' UI, not a bug with the wire format.
Comment 3 Daniel Nebdal 2015-03-05 17:30:57 UTC
He never suggested changing the wire format, and I agree with the argument that it's a browser UI failure. Still, the current state of affairs makes using "number" for decimal input hard to recommend unless you know your users will always write decimals with a dot.

As for how this relates to the *spec* (as opposed to filing bugs with the browser vendors), there seems to be a few possible approaches:

A) Add some wording to strongly suggest that browser UIs should accept both comma and full stop as separators in typed-input contexts where they would accept either of them.
B) Add some canonical way to get hold of the raw text value of the field (where one exists), so this can be worked around in javascript.


Both are a bit clunky, of course.
Comment 4 Ian 'Hixie' Hickson 2015-03-30 22:26:01 UTC
The UI isn't specced at all, that's entirely a UA issue.