@@ -400,6 +400,7 @@ stringLiteral pss | Just s <- decodeString pss =
400400 stringLiteral' :: Text -> Text
401401 stringLiteral' s = "\"" <> T.concatMap encodeChar s <> "\""
402402 encodeChar :: Char -> Text
403+ encodeChar '\0' = "\\0"
403404 encodeChar '\b' = "\\b"
404405 encodeChar '\t' = "\\t"
405406 encodeChar '\n' = "\\n"
@@ -409,6 +410,7 @@ stringLiteral pss | Just s <- decodeString pss =
409410 encodeChar '"' = "\\\""
410411 encodeChar '\\' = "\\\\"
411412 encodeChar c = T.singleton $ c
413+stringLiteral _ = "\"\\uFFFD\""
412414
413415unbox :: Text -> AST -> Text
414416unbox _ v@(NumericLiteral{}) = prettyPrintCpp1 v