
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 6/25/10 17:56 , Roman Cheplyaka wrote:
* Brandon S Allbery KF8NH
[2010-06-25 05:00:08-0400] You might want to look at how Python is dealing with this (including the pain involved; best to learn from example).
Do you mean the pain when filenames can not be decoded using current locale settings and thus the files are not accessible? (The same about environment variables.)
Yes, this.
Agreed, it's unpleasant. The other way would be changing [Char] to [Word8] or ByteString. But this would a) break all existing programs and b) be an OS-specific hack. Crap.
But it *is* OS-specific, just as Windows' UTF-16 is an OS-specific mechanism. Unfortunately, there's no good solution in the Unix case aside from assuming a specific encoding, and the locale is as good as any; but I think LC_CTYPE is probably the most applicable. This will, however, confuse everyone else. Perhaps best is to look at whether there is any consensus building as to how to resolve it, and if not use locale but document it as an unstable interface. Or possibly just leave things as is until consensus develops. It would be Bad to choose one (say, locale) only to have everyone else go in a different direction (say, UTF-8 with the application libraries potentially re-encoding filenames). (The flip side of *that*, of course, is that everyone else (save GvR) may be waiting for the same thing. Which is why we look around first. At worst it may be a reason to push for something, perhaps as part of LSB and then assumed anywhere that doesn't have its own solution. I think the main issues there would be *BSD, which is used to being on the wrong end of the Linux stick, and Solaris which Oracle has helpfully (effectively; nobody manning the rudders) nuked from orbit. :/ ) - -- brandon s. allbery [linux,solaris,freebsd,perl] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwlKo8ACgkQIn7hlCsL25W4YwCfYeWFXWMiE6FqoODYVNv4jK4c LusAnRwi839s9l6bnNj7tcXUTu1i1BGU =7L0U -----END PGP SIGNATURE-----