You can use Character#getType
to check the character's general category:
System.out.println(Character.DECIMAL_DIGIT_NUMBER == Character.getType('१'));
This will print true
, which is an "evidence" that '१' is a digit number.
Now let's examine the unicode value of the '१' character:
System.out.println(Integer.toHexString('१'));
// 967
This number is on the range of Devanagari digits - which is: \u0966
through \u096F
.
Also try:
Character.UnicodeBlock block = Character.UnicodeBlock.of('१');
System.out.println(block.toString());
// DEVANAGARI
Devanagari is:
is an abugida (alphasyllabary) alphabet of India and Nepal
"१२३" is a "123" (Basic Latin unicode).
Reading:
Integer.parseInt("१२३")
. – Cartilaginous"ⅯⅭⅯⅬⅩⅩⅩⅤ".isnumeric()
is also True (in Python, but presumably in Java too), as is"⅕".isnumeric()
– Neap"π".isnumeric()
or"e".isnumeric()
? – TillionⅯⅭ
andMC
. – Neap\d
is a synonym for[0-9]
. It won't match the Devanagari digits. – Brochusanskrit
,0
was invented in this language, if you do a simple google search on sanskrit numbers you will get this check this for reference (2indya.com/2011/06/22/sanskrit-counting-1-to-100) – Astronomy