(s)
| 90 | |
| 91 | # Turn a Unicode string to plain ASCII, thanks to https://stackoverflow.com/a/518232/2809427 |
| 92 | def unicodeToAscii(s): |
| 93 | return ''.join( |
| 94 | c for c in unicodedata.normalize('NFD', s) |
| 95 | if unicodedata.category(c) != 'Mn' |
| 96 | and c in allowed_characters |
| 97 | ) |
| 98 | |
| 99 | ######################### |
| 100 | # Here's an example of converting a unicode alphabet name to plain ASCII. This simplifies the input layer |
no outgoing calls
no test coverage detected