[Haskell-cafe] Re: [Haskell] ANNOUNCE: jhc 0.7.4

Brandon S Allbery KF8NH allbery at ece.cmu.edu
Tue Jul 13 12:16:55 EDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 7/12/10 22:29 , Richard O'Keefe wrote:
> On Jul 11, 2010, at 9:38 AM, wren ng thornton wrote:
>> Generally OSX takes UTF16 to be the standard encoding (I don't recall if
>> it's LE or BE), though UTF8 is supported almost everywhere. I haven't
>> checked to see whether that would affect this particular task though.
> 
> Mac OS X 10.5 came with a lot of locales, including a lot of
> UTF-8 ones.  Indeed, the default was a UTF-8 one.
> But it didn't come with *any* UTF-16 locales.
> (As tested by 'locale -a'.)

wren is half right:  at the level of Unixy APIs (and this includes anything
that goes on in a Terminal window and anything that you will be doing from
Haskell) you use UTF8, but OSX APIs --- that is, Carbon and Cocoa --- use
UTF16.  So for the purposes of ghc/jhc OSX is UTF8, but if someone wrote a
"fully native" Cocoa-based runtime it would use UTF16.  (Compare Win32 APIs
to mingw APIs; very similar situation.)

- -- 
brandon s. allbery     [linux,solaris,freebsd,perl]      allbery at kf8nh.com
system administrator  [openafs,heimdal,too many hats]  allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university      KF8NH
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkw8kXcACgkQIn7hlCsL25XMBwCghhWYpvyhhpG5L3tnOZQcJPIQ
h8oAnA5c5kCbrjtD5bMe/yAyw/BDUTAl
=p0QN
-----END PGP SIGNATURE-----


More information about the Haskell-Cafe mailing list