On Aug 20, 2009, at 05:07 , Ketil Malde wrote:
   % ghci -e 'map Data.Char.ord "饁"'
   <interactive>:1:21:
       lexical error in string/character literal at character '\129'

but again:

   % ghci -e 'map Data.Char.ord "£"'
   [194,163]

So GHCi used interactively translates input from the terminal's UTF-8,
but outputs truncates output to eight bits.  Executing a string with
-e, it appears to read byte for byte (which I think was the original
behavior at some point).


Makes sense; absent utf8-string, System.Environment.getArgs only groks bytes.

--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com
system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH


Attachment: PGP.sig
Description: This is a digitally signed message part

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to