Message9293

Author zyasoft
Recipients amak, fwierzbicki, pekka.klarck, zyasoft
Date 2015-01-04.17:28:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1420392505.32.0.811934321613.issue1839@psf.upfronthosting.co.za>
In-reply-to
Content
Changing this current behavior is much, much harder than it first appears. I have partially addressed it with the fix for #2239, but the problem is that the file system encoding for Jython is in some sense None - Jython simply uses Unicode paths, much like Java. Also returning None is considered correct behavior: "returns None if the system default encoding is used" (https://docs.python.org/2/library/sys.html#sys.getfilesystemencoding)

Supporting anything else is a very big issue once we consider Java integration. In general, any solution should ensure that the following code snippet would always work:

[java.io.File(p).exists() for p in os.listdir()]

regardless of how wrapped these calls (java.io.File or os.listdir) might actually be.

Note that this is somewhat similar to Windows which uses "mbcs" for its file system encoding. Also this problem goes away more or less with Jython 3.

Set priority accordingly to low: there is no straightforward perfect fix, which makes sense because it's an integration issue.
History
Date User Action Args
2015-01-04 17:28:25zyasoftsetmessageid: <1420392505.32.0.811934321613.issue1839@psf.upfronthosting.co.za>
2015-01-04 17:28:25zyasoftsetrecipients: + zyasoft, fwierzbicki, amak, pekka.klarck
2015-01-04 17:28:25zyasoftlinkissue1839 messages
2015-01-04 17:28:24zyasoftcreate