Message234794
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. |
|
Date |
User |
Action |
Args |
2015-01-26 23:12:33 | amswap | set | recipients:
+ amswap, vstinner, tim.golden, ezio.melotti, zach.ware, steve.dower |
2015-01-26 23:12:33 | amswap | set | messageid: <1422313953.49.0.417461130332.issue23327@psf.upfronthosting.co.za> |
2015-01-26 23:12:33 | amswap | link | issue23327 messages |
2015-01-26 23:12:33 | amswap | create | |
|