[fix] scripts

This commit is contained in:
Al
2015-09-22 15:15:30 -04:00
parent b405a53fe1
commit 25917cfb17

View File

@@ -163,9 +163,10 @@ def get_string_script(s):
is_ascii = True
script_len = 0
for c in s:
if (ord(c)) >= len(char_scripts):
continue
script = char_scripts[ord(c)]
if (ord(c)) < len(char_scripts):
script = char_scripts[ord(c)]
else:
script = UNKNOWN_SCRIPT
if script == COMMON_SCRIPT and last_script != UNKNOWN_SCRIPT:
script = last_script
if last_script != script and last_script != UNKNOWN_SCRIPT and last_script != COMMON_SCRIPT: