Ticket #5257 (closed bug: fixed)
Calling fail on a UTF-8 encoded string (in file) causes garbage to be printed
| Reported by: | anthony.de.almeida.lopes | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.2.1 |
| Component: | Runtime System | Version: | 7.0.2 |
| Keywords: | Cc: | ||
| Operating System: | Linux | Architecture: | x86_64 (amd64) |
| Type of failure: | Incorrect result at runtime | Difficulty: | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description (last modified by simonmar) (diff)
For example,
guerrilla@delta:/tmp/foo$ cat Test.hs
module Main where
main :: IO ()
main =
do
putStrLn "μ"
fail "μ"
guerrilla@delta:/tmp/foo$ ./Test
μ
Test: user error (�)
guerrilla@delta:/tmp/foo$ ./Test 2>&1 | xxd
0000000: cebc 0a54 6573 743a 2075 7365 7220 6572 ...Test: user er
0000010: 726f 7220 28bc 290a ror (.).
Using either encodeString or writing it in escaped hexidecimal does work.
Change History
Note: See
TracTickets for help on using
tickets.
