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
When testing convert-string-to-ascii.py code for errors, I ran this code:
string_to_ascii('�') # returns 1114111
The string uses the character "U+10FFFF" if this code was actually converting to ASCII it should have aborted this code as U+10FFFF is not in the ASCII set.
I was expecting the code to crash or throw however this never happened. The code instead returns 1114111 or 0x10FFFF in decimal. ASCII only includes the numbers 0 to 255(0xFF) as its addressable range. This could cause behavior and assumptions not accurate to reality.
Change suggestions:
Replace all references to ASCII with Unicode
Rename file to convert-string-to-unicode.py or another accurate name