[Haskell] System.FilePath survey
John Meacham
john at repetae.net
Tue Feb 7 19:32:02 EST 2006
On Tue, Feb 07, 2006 at 04:25:35PM +0000, Ben Rudiak-Gould wrote:
> The point is that different things are natively handled in different
> formats under different OSes, e.g.
>
> Posix NT Win9x
>
> pathnames bytes UTF-16 locale
> command line bytes UTF-16 locale
> file contents bytes bytes bytes
> pipes/sockets bytes bytes bytes
actually, Posix systems should be the following
> pathnames locale UTF-16 locale
> command line locale UTF-16 locale
> file contents * bytes bytes
> pipes/sockets * bytes bytes
Although the Posix interface is in terms of bytes, the strings should
always be interpreted via the locale specified in $LANG or $LC_CTYPE
also, for file contents and pipes/sockets, if you are passing text, and
in the absence of some overriding standard or protocol, you should be
using the encoding specified in the locale too.
John
--
John Meacham - ⑆repetae.net⑆john⑈
More information about the Libraries
mailing list