From 06f9a1fcbb40856fae744e49be3bf0e166246293 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Tue, 10 Aug 2010 15:55:43 -0400 Subject: Better UTF-8 escaping for JavaScript and SQL literals --- src/jscomp.sml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/jscomp.sml') diff --git a/src/jscomp.sml b/src/jscomp.sml index 4b04194c..f97725eb 100644 --- a/src/jscomp.sml +++ b/src/jscomp.sml @@ -435,7 +435,7 @@ fun process file = | #"\r" => "\\r" | #"\t" => "\\t" | ch => - if Char.isPrint ch then + if Char.isPrint ch orelse ord ch >= 128 then String.str ch else "\\" ^ padWith (#"0", -- cgit v1.2.3