scraperwiki-python icon indicating copy to clipboard operation
scraperwiki-python copied to clipboard

Python3 unicode

Open MaxKurama opened this issue 9 years ago • 1 comments

In python3 we do not have unicode strings, so we do not need to decode them.

MaxKurama avatar Aug 25 '16 18:08 MaxKurama

This fix is not quite right and will make successful running conditional on the system configuration.

A better fix would be to specify the encoding on the NamedTemporaryFile(*, encoding="utf-8"). Then rather than trying to .decode you can instead just get rid of the .decode. This will then work correctly on both python 2 & 3 and independently of system configuration variables such as LC_CTYPE and PYTHONIOENCODING.

pwaller avatar Aug 26 '16 08:08 pwaller