#4006: System.Process doesn't encode its arguments.
----------------------------------+-----------------------------------------
Reporter: Khudyakov | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: libraries/process | Version: 6.12.1
Keywords: | Difficulty:
Os: Linux | Testcase:
Architecture: Unknown/Multiple | Failure: None/Unknown
Patch: 0 |
----------------------------------+-----------------------------------------
Comment(by igloo):
"truncate" here means it just takes the low 8 bits of each `Char`:
{{{
import System.Process
testUnicode :: String -> IO ()
testUnicode str = do str' <- readProcess "echo" [str] ""
print (length str, length str')
print (str, str')
}}}
It's not clear to me that UTF8 encoding is the right thing to do.
Shouldn't there be a low level function which takes `[Word8]` rather than
`String`, and then perhaps a `String` function on top of that which does
UTF8 encoding?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4006#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs