Added support for letter 'İ' that has no lower equivalent
[decoratedstr.git] / decoratedstr.py
index 866497ccab144e4888611716f65e4247753b37a3..50aff673004e6642a9ad68eec898c80cb9463411 100755 (executable)
@@ -26,17 +26,25 @@ char_to_alternatives_lower={
     u'z': u'źżž',
 }
 
+# This chars lower() function doesn't work
+char_to_alternatives_upper={
+    u'I': u'İ',
+}
 char_to_alternatives={} # idem, but with upper case too
 for char,alternatives in char_to_alternatives_lower.iteritems():
     char_to_alternatives[char] = alternatives
     char_to_alternatives[char.upper()] = alternatives.upper()
-
+for char,alternatives in char_to_alternatives_upper.iteritems():
+    char_to_alternatives[char] = alternatives
 
 alternative_to_char = {} # reverse
 for char,alternatives in char_to_alternatives_lower.iteritems():
     for alternative in alternatives:
         alternative_to_char[alternative] = char
         alternative_to_char[alternative.upper()] = char.upper()
+for char,alternatives in char_to_alternatives_upper.iteritems():
+    for alternative in alternatives:
+        alternative_to_char[alternative] = char
 
 # ligatures (only two chars supported)
 ligatures_expansions_lower = {