You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use unidecode python module to switch non ascii characters within UTF8 to nearest ascii equivalent.
with open(this_path) as f:
file_contents = f.read()
if not file_contents.isascii():
print(
f"Invalid: {dirpath} - {filename} contained non-ascii chars found by Python"
)
with open(this_path, "wt", encoding="utf-8") as this_file:
this_file.write(unidecode(file_contents))
The text was updated successfully, but these errors were encountered:
use
unidecode
python module to switch non ascii characters within UTF8 to nearest ascii equivalent.The text was updated successfully, but these errors were encountered: