javascript - How to convert non-Latin numerals to their Latin counterparts -


i have system in different language implemented in unicode. condition system must accept unicode characters (for digits) , process them accordingly. possible convert unicode characters(that represents numbers) sensible english numbers equivalent?

how can implement in javascript?

edit: searched web , found chart in unicode.org . there codes corresponding literals want there. now, how read code input unicode string ?

the unicode database contains in column 6-8 information digit values, decimal digit values , number values (like u+216e: roman numeral 5 hundred has number value of 500).

to use in javascript, might parse file other language , dump information need json or similar, , value in json javascript.

documentation of unicode database file format

either dump unicode codepoints json "\u20ac" u+20ac, can compare characters, or can use somestring.charcodeat(someposition).tostring(16) convert character hex string (like 20ac) compare there.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -