Skip to content

Require Western Arabic (ASCII) numerals for max_rows #1

Merged
merged 1 commit into from Feb 15, 2013

2 participants

@patch
patch commented Feb 15, 2013

Hi Jim,

Previously, any Unicode character with the General_Category property of Decimal_Number was permitted as the value of max_rows. This included Eastern Arabic numerals like ٤٠ and Devanagari numerals like ४० (both represent the Western Arabic 40). However, max_rows was later being used with the numeric equality operator ==, which only understands Western Arabic numerals. I fixed this by replacing \d in the validation regex with [0-9] so that only 0 through 9 are valid and no other of the Decimal_Number characters. Two tests were also added.

Best,
Nick

@patch patch Require Western Arabic numerals for max_rows
Previously, any Unicode character with the General_Category property of
Decimal_Number was permitted as the value of max_rows.  This included Eastern
Arabic numerals like '٤٠' and Devanagari numerals like '४०' (both represent the
Western Arabic '40').  However, max_rows was later being used with the numeric
equality operator (==), which only understands Western Arabic numerals.  This
was fixed by replacing \d in the validation regex with [0-9] so that only '0'
through '9' are valid and no other of the Decimal_Number characters.
e162a87
@jkeenan jkeenan merged commit 4c1b221 into jkeenan:master Feb 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.