The short answer is that you cannot change it.
print xis the same as, putStrLn (show x)and you cannot change the method showfor types that already have a specific Show instance.
However, you can define your own formatting functions:
fmtChar :: Char -> String
fmtChar ch = ...
fmtString :: String -> String
fmtString s = "\"" ++ (concatMap fmtChar s) ++ "\""
and use them where you want to see your format:
putStrLn $ fmtString [ chr 0x49, chr 0x9f ]
One way to determine fmtChar:
import Numeric (showHex)
fmtChar ch =
if length s == 1
then s
else "\\x" ++ showHex (fromEnum ch) ""
where s = show ch
(: Numeric base, .)