From 3a7888e66008f1df2e68474c94f94c82f6042383 Mon Sep 17 00:00:00 2001 From: bjorn Date: Mon, 15 Sep 2008 13:16:04 +0000 Subject: A somewhat better solution to the words/UTF-8 problem: do encoding last, but only on what appears to be string literals. --- src/GF/Infra/CompactPrint.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/GF/Infra/CompactPrint.hs') diff --git a/src/GF/Infra/CompactPrint.hs b/src/GF/Infra/CompactPrint.hs index ca2452de6..486c9e183 100644 --- a/src/GF/Infra/CompactPrint.hs +++ b/src/GF/Infra/CompactPrint.hs @@ -5,8 +5,7 @@ compactPrint = compactPrintCustom keywordGF (const False) compactPrintGFCC = compactPrintCustom (const False) keywordGFCC --- FIXME: using words is not safe, since this is run on UTF-8 encoded data. -compactPrintCustom pre post = id -- dps . concat . map (spaceIf pre post) . words +compactPrintCustom pre post = dps . concat . map (spaceIf pre post) . words dps = dropWhile isSpace -- cgit v1.2.3