matthewwithanm / django-imagekit

Automated image processing for Django. Currently v4.0
http://django-imagekit.rtfd.org/
BSD 3-Clause "New" or "Revised" License
2.26k stars 276 forks source link

UnicodeEncodeError thrown on images with non-ASCII filenames #452

Open neomanic opened 6 years ago

neomanic commented 6 years ago

I've recently upgraded from ImageKit 2 all the way through to the current version in the process of migrating to Python 3, and I'm running into an error with filenames containing unicode: namely loading an admin page with an AdminThumbnail as one of the columns.

I've attached unicode_error_traceback.txt, which occurred for two files: one with \u2013 (en-dash) and one with '\u2019' (curly quotes). Once I manually changed these filenames to have only ASCII characters, the problems went away.

Now I'm rather perplexed since:

Thoughts?

vstoykov commented 6 years ago

This happens on development environment also or only on production environment? If it is happening on production only how you check which locale is set?

neomanic commented 6 years ago

Both environments. I didn’t have the Unicode file names in my dev environment though, so I didn’t encounter the error. Fixed that in my tests now!

On 25 Jan 2018, at 2:31 am, Venelin Stoykov notifications@github.com wrote:

This happens on development environment also or only on production environment? If it is happening on production only how you check which locale is set?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.