forked from GitHub/gf-core
made ps -from_TRANSLIT symmetric to -to_TRANSLIT in the sense that unknown characters are returned as themselves and not as question marks
This commit is contained in:
@@ -75,8 +75,8 @@ appTransToUnicode trans =
|
|||||||
appTransFromUnicode :: Transliteration -> String -> String
|
appTransFromUnicode :: Transliteration -> String -> String
|
||||||
appTransFromUnicode trans =
|
appTransFromUnicode trans =
|
||||||
concat .
|
concat .
|
||||||
map (maybe "?" id .
|
map (\c -> maybe [toEnum c] id $
|
||||||
flip Map.lookup (trans_from_unicode trans)
|
Map.lookup c (trans_from_unicode trans)
|
||||||
) .
|
) .
|
||||||
map fromEnum
|
map fromEnum
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user