From b1402e8bd6a68a891b00a214d6cf184d66defe19 Mon Sep 17 00:00:00 2001 From: aarne Date: Mon, 22 Sep 2003 13:16:55 +0000 Subject: Founding the newly structured GF2.0 cvs archive. --- src/GF/Text/Unicode.hs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/GF/Text/Unicode.hs (limited to 'src/GF/Text/Unicode.hs') diff --git a/src/GF/Text/Unicode.hs b/src/GF/Text/Unicode.hs new file mode 100644 index 000000000..78aba0461 --- /dev/null +++ b/src/GF/Text/Unicode.hs @@ -0,0 +1,24 @@ +module Unicode where + +import Greek (mkGreek) +import Arabic (mkArabic) +import Hebrew (mkHebrew) +import Russian (mkRussian, mkRusKOI8) + +-- ad hoc Unicode conversions from different alphabets + +-- AR 12/4/2000, 18/9/2001, 30/5/2002 + +mkUnicode s = case s of + '/':'/':cs -> mkGreek (remClosing cs) + '/':'+':cs -> mkHebrew (remClosing cs) + '/':'-':cs -> mkArabic (remClosing cs) + '/':'_':cs -> mkRussian (remClosing cs) + '/':'*':cs -> mkRusKOI8 (remClosing cs) + _ -> s + +remClosing cs + | lcs > 1 && last cs == '/' = take (lcs-2) cs + | otherwise = cs + where lcs = length cs + -- cgit v1.2.3