Swapneel Ambre added the comment:

Sorry I was not very clear about the use case. 

The name of the zipfile or any parent directory name could contain non-ascii 
characters. Consider a use case where you want to ship some product with third 
party module shipped as an egg file (say example.egg) along with your product. 
You don't have control over where the product files gets installed. Someone 
could install the product files under say C:\的\product_name. So both your 
product (exe or python files) and the egg files are installed under a path with 
non-ascii characters in it. Any import statements trying to import modules from 
the egg file will fail with UnicodeEncodeError as zipimport will try to use 
PyUnicode_EncodeFSDefault with 'mbcs' encoding on Windows. 

I hope the use case is clearer now. I do agree that it is a corner case 
scenario and using ASCII names is a better option :-)

I will create a complete patch and sign contributor agreement.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23327>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to