[Haskell-cafe] Unicode strings and runCommand / runProcess

John Goerzen jgoerzen at complete.org
Fri Apr 23 19:50:54 EDT 2010


Ivan Lazar Miljenovic wrote:
> John Goerzen <jgoerzen at complete.org> writes:
>> ghci
>> GHCi, version 6.12.1: http://www.haskell.org/ghc/  :? for help
>> Loading package ghc-prim ... linking ... done.
>> Loading package integer-gmp ... linking ... done.
>> Loading package base ... linking ... done.
>> Prelude> :m System.Process
>> Prelude System.Process> runCommand "echo привет"
>> ?@825B
> 
> Are you arguing about IO-specific stuff like this, or for all non-ASCII
> Strings?
> 

I'm not sure I understand the question.  I consider the behavior in 
System.IO to be well-documented.  The behavior in System.Process is not 
documented at all.  As I said, I'm not certain what the proper answer 
is, but not documenting what happens probably isn't it.

Actually, the behavior of openFile when given a String with characters > 
0xFF is also completely undocumented.  I am not sure what it does with 
that.  It should probably be the same as runCommand, whatever it is.

-- John


More information about the Haskell-Cafe mailing list