[whatwg] Decimal comma in numeric input

On Thu, Jan 19, 2012 at 3:38 PM, Ian Hickson <ian at hixie.ch> wrote:

> > > On Thu, 14 Apr 2011, John Tamplin wrote:
> > > >
> > > > The entire web application, which includes both client and
> > > > server-side code, must have the same idea about what locale the user
> > > > is using.  If the app provides a drop-down box or preference setting
> > > > to choose a different locale, as most localized apps do, the web
> > > > browser has to be using the same locale for any native locale
> > > > processing it uses. Otherwise, you run a serious risk of having
> > > > incorrect data -- if a user types "10,000" in a field when they
> > > > think they are using a locale with a comma as the decimal separator,
> > > > does the app receive that as 10000 or 10.000?  If the app is running
> > > > in en-US because the user requested it or their system locale isn't
> > > > supported by the app, and the browser sends "10.000" as the value
> > > > because the system locale is "de", then that is a problem.
> > >
> > > Indeed. To solve this, we need help from CSS. That's one of the
> > > reasons we created<output> in HTML.
> >
> > This is about data representation and localization, not about optional
> > stylistic suggestions, so CSS is a wrong way to deal with the issue.
>
> I disagree. It's entirely a presentational issue. It's almost the
> _definition_ of a presentational issue.


I still disagree -- a user types "1,575" in a field.  Is that interpreted
as a value between 1 and 2 or between 1000 and 2000?  Interpretation of the
value entered by the user has nothing to do with CSS.

-- 
John A. Tamplin
Software Engineer (GWT), Google

Received on Thursday, 19 January 2012 12:51:52 UTC