def fix_case(name):
 for (s, r) in LOCALE_NORMALIZATION.items():
  name = name.replace(s, r)
 return name

def fix_case ( name ) : for ( s , r ) in LOCALE_NORMALIZATION . items ( ) : name = name . replace ( s , r ) return name
locale -a might return the encoding in either lower or upper case .