@@ -72,6 +72,7 @@ codegenC' defs out exec incs objs libs flags exports iface dbg
72 Raw -> writeSource out cout
72 Raw -> writeSource out cout
74 (tmpn, tmph) <- tempfile ".c"
74 (tmpn, tmph) <- tempfile ".c"
75+ hSetEncoding tmph utf8
75 hPutStr tmph cout
76 hPutStr tmph cout
76 hFlush tmph
77 hFlush tmph
77 hClose tmph
78 hClose tmph
@@ -121,7 +122,7 @@ gccDbg _ = []
122cname :: Name -> String
123cname :: Name -> String
123cname n = "_idris_" ++ concatMap cchar (showCG n)
124cname n = "_idris_" ++ concatMap cchar (showCG n)
124− where cchar x | isAlpha x || isDigit x = [x]
125+ where cchar x | isAscii x && isAlpha x || isDigit x = [x]
125 | otherwise = "_" ++ show (fromEnum x) ++ "_"
126 | otherwise = "_" ++ show (fromEnum x) ++ "_"
127indent :: Int -> String
128indent :: Int -> String