Closed
Bug 679220
Opened 14 years ago
Closed 12 years ago
Numerical input types should be able to accept Arabic, Persian, and other non-ASCII digits
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
VERIFIED
FIXED
mozilla29
People
(Reporter: ehsan.akhgari, Assigned: jwatt)
References
(Blocks 1 open bug)
Details
See http://www.w3.org/Bugs/Public/show_bug.cgi?id=12915.
We basically need to include the Arabic and Persian digit ranges in the regular expression that we use to see if we should accept those characters, and also make sure that we can parse them for the purpose of internal storage (and form submission).
Mounir, can you please point me to where that regex lives?
Updated•14 years ago
|
OS: Mac OS X → All
Hardware: x86 → All
Comment 1•14 years ago
|
||
(In reply to Ehsan Akhgari [:ehsan] from comment #0)
> Mounir, can you please point me to where that regex lives?
There is no code doing that for the moment (if you speak of <input type='number'>).
Reporter | ||
Comment 2•14 years ago
|
||
(In reply to Mounir Lamouri (:volkmar) (:mounir) from comment #1)
> (In reply to Ehsan Akhgari [:ehsan] from comment #0)
> > Mounir, can you please point me to where that regex lives?
>
> There is no code doing that for the moment (if you speak of <input
> type='number'>).
So, how does <input type=number> work right now?
Comment 3•14 years ago
|
||
(In reply to Ehsan Akhgari [:ehsan] from comment #2)
> (In reply to Mounir Lamouri (:volkmar) (:mounir) from comment #1)
> > (In reply to Ehsan Akhgari [:ehsan] from comment #0)
> > > Mounir, can you please point me to where that regex lives?
> >
> > There is no code doing that for the moment (if you speak of <input
> > type='number'>).
>
> So, how does <input type=number> work right now?
It's not in the tree... and the WIP implementation I have doesn't handle that but it doesn't handle a lot of other stuff too.
Comment 4•14 years ago
|
||
I think we should include as "digits" any codepoints with the Unicode General Category of Decimal_Number (Nd). For the record, there are currently 42 x 10 of these, listed in the last section of http://unicode.org/Public/UNIDATA/extracted/DerivedNumericType.txt.
Summary: Numerical input types should be able to accept Arabic and Persian digits → Numerical input types should be able to accept Arabic, Persian, and other non-ASCII digits
![]() |
Assignee | |
Comment 5•12 years ago
|
||
I'm planning on using icu::DecimalFormater for this, but it seems that isn't possible from libxul just yet. I'll need bug 915735 to be fixed first, and that may take some time.
Depends on: 915735
Updated•12 years ago
|
Blocks: number-input
![]() |
Assignee | |
Updated•12 years ago
|
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
Target Milestone: --- → mozilla29
Comment 7•12 years ago
|
||
Marking as verified by:
- verifying bug 844744 is fixed on Aurora 29.0a2 under Win 7 64-bit, Ubuntu 32-bit and MAC OS X 10.9
- checking en-US, European, Persian and Arabic builds
data:text/html,<input type=number lang=ar step=any>
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•