Doesn't the current code already do that? Other scripts will use characters with ord() > 127.
If ord(x) > 127, then character x is considered ok.
In other words: right now, a keyword goes into 11.html if and only if it its 2-character prefix contains an ascii char x with ord(x) <= 127 which is not a letter. And I have tested that, in this case, the keyword is correctly retrieved.
Am I missing something?