Thread: ePUB Optimizer
View Single Post
Old 01-03-2018, 03:07 PM   #123
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,914
Karma: 6120478
Join Date: Nov 2009
Device: many
Python 3.6 has a new PEP 528 and PEP 529 that changes things for paths on Windows.

Windows is hard but Python 3.6 and sys.getfilesystemencoding() will fix most of this. The real problem for paths in Python is in Linux which can theoretically use arbitrary bytes sequences with no encoding at all inside file paths when the C-locale is set by the user forcing the use of surrogateescape to smuggle/hide these non-utf-8 byte sequences into utf-8 strings. But, of course these can not be printed either!

https://www.python.org/dev/peps/pep-0528/

https://www.python.org/dev/peps/pep-0529/
KevinH is offline   Reply With Quote