[Haskell-cafe] Unicode strings and runCommand / runProcess
jgoerzen at complete.org
Fri Apr 23 22:14:55 EDT 2010
Khudyakov Alexey wrote:
>> 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.
> Under unices file names are just array of bytes. There is no notion of encoding
> at all. It's just matter of interpretation of that array.
Quite right. One must be able to pass binary strings, which contain
anything except \0 and '/' to openFile. The same goes for runCommand.
I am uncomfortable, for this reason, with saying that runCommand ought
to re-encode in the system locale while openFile doesn't. It is
preferable to drop characters than to drop the ability to pass arbitrary
So I am not sure I agree with your stance in
More information about the Haskell-Cafe