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
{{ message }}
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.
If I run crosswords ?sunción the program doesn't display asuncion but it fails with a UnicodeDecodeError. This happens because the default encoding ASCII can't perform the .decode() operation:
>>> 'Asunción'.decode()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 6: ordinal not in range(128)
It may be worth passing the encoding explicitly to decode to avoid relying on the default encoding. It may also be a good idea to inform the user though I'm not sure where it's best to catch this error (in compile_pattern and let that function return None instead?).
The text was updated successfully, but these errors were encountered:
Right, when I wrote the script some years ago I used non-accented words on the CLI to avoid that, but it should be fixed. We also have a lot of accented words in French but accents are not needed in crosswords.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm using Python 2.6.
If I run
crosswords ?sunción
the program doesn't displayasuncion
but it fails with a UnicodeDecodeError. This happens because the default encoding ASCII can't perform the.decode()
operation:It may be worth passing the encoding explicitly to decode to avoid relying on the default encoding. It may also be a good idea to inform the user though I'm not sure where it's best to catch this error (in
compile_pattern
and let that function returnNone
instead?).The text was updated successfully, but these errors were encountered: