Some have suggested using the tr_TR.utf8
locale. At least on Ubuntu, perhaps related to this bug, setting this locale does not produce the desired result:
import locale
locale.setlocale(locale.LC_ALL, 'tr_TR.utf8')
myCity = u'Isparta ?sparta'
print(myCity.lower())
# isparta isparta
So if this bug affects you, as a workaround you could perform this translation yourself:
lower_map = {
ord(u'I'): u'?',
ord(u'?'): u'i',
}
myCity = u'Isparta ?sparta'
lowerCity = myCity.translate(lower_map)
print(lowerCity)
# ?sparta isparta
prints
?sparta isparta
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…