I am currently building a transliteration web interface based on icu4j. What is the best way to automatically detect what is script system the user enters queries?
E.g. if the input is 身体里 or عالمتاب how can/should I recognize from which script system does this come?
The simplest way would be to check the script of the first character:
A better way would be to find the most frequently occurring script: