On Tue, Aug 18, 2009 at 12:54 PM, Troels Liebe Bentsen<t...@rapanden.dk> wrote:
> My idea with portable by default was only portability for modern Unix and > modern Windows. So DOS and VMS limitations would not apply. The problem of > enforcing truly "portable" filenames is that the files names get too > restrictive and for most applications targeting 98% of systems out there would > be enough. That's a decent enough point, but it may be unwise to ignore legacy systems that where Perl 5 is in common use, unless we want to shed that userbase. (Mark this down as a "I don't know, and I don't have a stake in it, but…) > With modern Unix/Windows I'm thinking about systems that support and use UCS2 > or UTF8 and where "." or other common characters does not have special meaning > for the filesystem. We also need to keep in mind the Unicode problems between certain unixy platforms (i.e. MacOS X vs. most if not all the rest). If I recall correctly, the internal Unicode format chosen for Perl 6 is incompatible with MacOS X, because MacOS X implemented Unicode support at a time when the standard as we know it today wasn't finalized. This has bearing on filenames, and MacOS X isn't a small enough platform that it can simply be ignored, either. > Besides that, a simple check on Unix for what the locale is set to might also > be > nice, so we don't write UTF8 files on a filesystem where the rest for the > files > are in Latin1. The locale doesn't say what format the filenames are on the filesystem, though, merely the current user's language preferences may be. That can't really be trusted, at least not for filename comparison purposes. But I agree that it's sensible to default to the locale's settings regarding character encoding. -- Jan