Changes between Version 2 and Version 3 of Ticket #3610, comment 4


Ignore:
Timestamp:
02/04/2016 04:51:42 PM (4 years ago)
Author:
sebastian
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3610, comment 4

    v2 v3  
    1 It seems that the reason it works when reading files from the local file system directly, is that Python automatically encodes filenames, e.g. when calling `open()`, according to [https://docs.python.org/2/library/sys.html#sys.getfilesystemencoding sys.getfilesystemencoding()]. This however, isn't always `UTF-8`. So it seems that if we want to ensure consistent behavior here, we have to manually decode/encode filenames in both cases. However, apparently Windows uses Unicode natively. So no idea what happens if you pass encoded `UTF-8` to a file API there. 
     1It seems that the reason it works when reading files from the local file system directly, is that Python automatically encodes filenames, e.g. when calling `open()`, according to [https://docs.python.org/2/library/sys.html#sys.getfilesystemencoding sys.getfilesystemencoding()]. 
     2 
     3This however, isn't always `UTF-8`. So it seems that if we want to ensure consistent behavior here, we have to manually decode/encode filenames in both cases. But apparently Windows uses Unicode natively. So no idea what happens if you pass encoded `UTF-8` to a file API there.