apache-commons-lang3

Why does Apache Commons consider '१२३' numeric?

心已入冬 提交于 2019-11-28 16:36:15
According to Apache Commons Lang's documentation for StringUtils.isNumeric() , the String '१२३' is numeric. Since I believed this might be a mistake in the documentation, I ran tests to verify the statement. I found that according to Apache Commons it is numeric. Why is this String numeric? What do those characters represent? Because that "CharSequence contains only Unicode digits" (quoting your linked documentation ). All of the characters return true for Character.isDigit : Some Unicode character ranges that contain digits: '\u0030' through '\u0039', ISO-LATIN-1 digits ('0' through '9') '