uploadcare / pillow-simd

The friendly PIL fork
https://python-pillow.github.io/pillow-perf/
Other
2.12k stars 85 forks source link

'UnicodeDecodeError' while installing library #106

Closed soulee-dev closed 2 years ago

soulee-dev commented 2 years ago

Bug report

Error message

... long_description = f.read() UnicodeDecodeError: 'cp949' codec can't decode byte 0xe2 in position 276: illegal multibyte sequence in Korean windows.

Then why?

In Python, Basically, They're using platform's preferred encoding. Python Docs But In case of CJK Windows, They're using their country-lanugage-own encoding standard. Worldwide Encoding specs

Detail

CP949 is Korean-specified Encoding type created by IBM and Microsoft.

This problem especially occurs on CJK(Chinese, Japanese, Korean) Windows. CJK has language-specific encoding standard country by country, language by language.

Solution

I highly recommend set Encoding to 'UTF-8' on setup.py

https://github.com/uploadcare/pillow-simd/blob/b36d71c2488d86198e651477e2e5bf04c4ca7332/setup.py#L974

into with open("README.md", encoding="utf-8") as f:

soulee-dev commented 2 years ago

When pip install 'pyrebase', I got error ' UnicodeDecodeError: 'cp949' codec can't decode byte 0xe2 in position 500: illegal multibyte sequence' - stackoverflow

homm commented 2 years ago

Thanks! I thought it always utf-8.