From 42b7b0f8c298150f0164e3134440b87dc2d3f79d Mon Sep 17 00:00:00 2001 From: aarne Date: Thu, 15 Sep 2011 10:49:40 +0000 Subject: [PATCH] made ps -from_TRANSLIT symmetric to -to_TRANSLIT in the sense that unknown characters are returned as themselves and not as question marks --- src/compiler/GF/Text/Transliterations.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/GF/Text/Transliterations.hs b/src/compiler/GF/Text/Transliterations.hs index aa9901141..b4ff2a64c 100644 --- a/src/compiler/GF/Text/Transliterations.hs +++ b/src/compiler/GF/Text/Transliterations.hs @@ -75,8 +75,8 @@ appTransToUnicode trans = appTransFromUnicode :: Transliteration -> String -> String appTransFromUnicode trans = concat . - map (maybe "?" id . - flip Map.lookup (trans_from_unicode trans) + map (\c -> maybe [toEnum c] id $ + Map.lookup c (trans_from_unicode trans) ) . map fromEnum