[whatwg] finding a number...

On Dec 13, 2006, at 14:24, Michel Fortin wrote:

> At the very least, I think find-a-number should be limited to  
> integer numbers. But even then it'll be limited to languages using  
> our western digits and possibly not suitable for full  
> internationalization.

Actually, with proper Unicode libraries it would be reasonable easy  
to handle any base-10 integers.

Such a scheme could be extended to numbers with a fractional decimal  
part if the decimal separator was given in an attribute explicitly  
(defaulting to "."). Thousand separators could be dealt with by  
skipping certain character classes.

It is reasonable to expect desktop and server software to have access  
to the Unicode database (e.g. by bundling ICU if there's isn't a  
proper platform API). However, JScript-based emulation layers on top  
IE and mobile software may not have access to the Unicode database.

-- 
Henri Sivonen
hsivonen at iki.fi
http://hsivonen.iki.fi/

Received on Wednesday, 13 December 2006 05:52:16 UTC