W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2006

[whatwg] finding a number...

From: Charles McCathieNevile <chaals@opera.com>
Date: Wed, 13 Dec 2006 12:02:07 +0530
Message-ID: <op.tkhi3t1kwxe0ny@widsith.local>
On Wed, 13 Dec 2006 01:51:32 +0530, Henri Sivonen <hsivonen at iki.fi> wrote:

> On Dec 12, 2006, at 15:36, Anne van Kesteren wrote:
>
>> On Tue, 12 Dec 2006 14:31:23 +0100, Henri Sivonen <hsivonen at iki.fi>  
>> wrote:
>>>> why does finding a number in text [1] insist on "." as a decimal  
>>>> seperator, when , is also very commonly used?
>>>
>>> I think the format should be kept simple (and potentially politically  
>>> incorrect), because the human-readability is only a legacy fallback  
>>> issue. That is, users aren't exposed to the number formatting in UAs  
>>> that actually implement progress bars and gauges.
>>
>> You might also want to use this algorithm for the proposed  
>> class="price". In that case you really want to take into account "," as  
>> well.
>
> What would 2,500 mean? Would it mean two and a half or two-thousand- 
> five-hundred?

In english it generally means two thousand five hundred. In french, it  
invariably means two and a half, to an accuracy of one in a thousand.

> How can this be dealt with without making the parsing dependent on lang  
> and requiring the UAs to implement all-encompassing CLDR-aware number  
> parsing?

It can't. But why bother making a standard that so clearly fails to work  
in major world languages? Everything should be as simple as possible *and  
no simpler* - this is too simple. Maybe assuming you can parse numbers out  
of text is just a dumb idea as a normative part of a spec.

cheers

Chaals


-- 
   Charles McCathieNevile, Opera Software: Standards Group
   hablo espa?ol  -  je parle fran?ais  -  jeg l?rer norsk
chaals at opera.com          Try Opera 9 now! http://opera.com
Received on Tuesday, 12 December 2006 22:32:07 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:31 UTC