Commit 767c1b72 authored by batterseapower's avatar batterseapower
Browse files

Attempt to fix decodingerror002 test for non-UTF8 locales

parent dddb294d
......@@ -3,7 +3,12 @@ import System.IO
import System.IO.Error
import GHC.IO.Handle (hSetEncoding)
main = alltests ""
main = do
-- Explicitly set stdout encoding so that the UTF8//ROUNDTRIP
-- test is always able to write the surrogate byte out without error.
enc <- mkTextEncoding "UTF8//ROUNDTRIP"
hSetEncoding stdout enc
alltests ""
alltests file = mapM (test file) ["UTF8",
Left hGetChar: invalid argument (invalid byte sequence)
Left hGetChar: end of file
�Left hGetChar: end of file
Left <stdout>: hPutChar: invalid argument (invalid character)
ÈLeft hGetChar: end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment