Auto-UTF handling (#4594)

This commit is contained in:
Glenn Jocher authored and GitHub committed 2021-08-29 17:15:18 +02:00
1 parent de44376d1b
commit e5e5ebc799
3 files changed
+10 -8

No files matched your search

+1 -1
View File
@@ -124,7 +124,7 @@ def is_pip():
def is_ascii(s=''):
# Is string composed of all ASCII (no UTF) characters?
s = str(s) # convert to str() in case of None, etc.
s = str(s) # convert list, tuple, None, etc. to str
return len(s.encode().decode('ascii', 'ignore')) == len(s)