1
0
forked from GitHub/gf-core

"Committed_by_peb"

This commit is contained in:
peb
2005-02-09 11:46:54 +00:00
parent 56c80bf8d9
commit 71c316cfc5
55 changed files with 485 additions and 339 deletions

View File

@@ -9,10 +9,11 @@
-- > CVS $Author $
-- > CVS $Revision $
--
-- (Description of the module)
-- ad hoc Unicode conversions from different alphabets
-- AR 12/4/2000, 18/9/2001, 30/5/2002, 26/1/2004
-----------------------------------------------------------------------------
module Unicode where
module Unicode (mkUnicode, treat) where
import Greek (mkGreek)
import Arabic (mkArabic)
@@ -30,10 +31,6 @@ import ExtraDiacritics (mkExtraDiacritics)
import Char
-- ad hoc Unicode conversions from different alphabets
-- AR 12/4/2000, 18/9/2001, 30/5/2002, 26/1/2004
mkUnicode s = case s of
'/':'/':cs -> treat [] mkGreek unic ++ mkUnicode rest
'/':'+':cs -> mkHebrew unic ++ mkUnicode rest
@@ -58,7 +55,7 @@ mkUnicode s = case s of
c:cs -> remClosing (c:u) cs
_ -> (reverse u,[]) -- forgiving missing end
-- don't convert XML tags --- assumes <> always means XML tags
-- | don't convert XML tags --- assumes \<\> always means XML tags
treat :: String -> (String -> String) -> String -> String
treat old mk s = case s of
'<':cs -> mk (reverse old) ++ '<':noTreat cs