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 4fd0c636f8
commit a0d4129863
55 changed files with 485 additions and 339 deletions

View File

@@ -12,7 +12,7 @@
-- (Description of the module)
-----------------------------------------------------------------------------
module Arabic where
module Arabic (mkArabic) where
mkArabic :: String -> String
mkArabic = unwords . (map mkArabicWord) . words

View File

@@ -12,7 +12,7 @@
-- (Description of the module)
-----------------------------------------------------------------------------
module Devanagari where
module Devanagari (mkDevanagari) where
mkDevanagari :: String -> String
mkDevanagari = digraphWordToUnicode . adHocToDigraphWord

View File

@@ -12,7 +12,7 @@
-- (Description of the module)
-----------------------------------------------------------------------------
module Ethiopic where
module Ethiopic (mkEthiopic) where
-- Ascii-Unicode decoding for Ethiopian
-- Copyright (c) Harald Hammarström 2003 under Gnu General Public License

View File

@@ -12,7 +12,7 @@
-- (Description of the module)
-----------------------------------------------------------------------------
module ExtendedArabic where
module ExtendedArabic (mkArabic0600, mkExtendedArabic) where
mkArabic0600 :: String -> String
mkArabic0600 = digraphWordToUnicode . aarnesToDigraphWord

View File

@@ -12,7 +12,7 @@
-- (Description of the module)
-----------------------------------------------------------------------------
module ExtraDiacritics where
module ExtraDiacritics (mkExtraDiacritics) where
mkExtraDiacritics :: String -> String
mkExtraDiacritics = mkExtraDiacriticsWord

View File

@@ -12,7 +12,7 @@
-- (Description of the module)
-----------------------------------------------------------------------------
module Greek where
module Greek (mkGreek) where
mkGreek :: String -> String
mkGreek = unwords . (map mkGreekWord) . mkGravis . words

View File

@@ -12,7 +12,7 @@
-- (Description of the module)
-----------------------------------------------------------------------------
module Hebrew where
module Hebrew (mkHebrew) where
mkHebrew :: String -> String
mkHebrew = mkHebrewWord

View File

@@ -12,7 +12,7 @@
-- (Description of the module)
-----------------------------------------------------------------------------
module Hiragana where
module Hiragana (mkJapanese) where
-- long vowel romaaji must be ei, ou not ee, oo

View File

@@ -12,7 +12,7 @@
-- (Description of the module)
-----------------------------------------------------------------------------
module LatinASupplement where
module LatinASupplement (mkLatinASupplement) where
mkLatinASupplement :: String -> String
mkLatinASupplement = mkLatinASupplementWord

View File

@@ -12,7 +12,7 @@
-- (Description of the module)
-----------------------------------------------------------------------------
module OCSCyrillic where
module OCSCyrillic (mkOCSCyrillic) where
mkOCSCyrillic :: String -> String
mkOCSCyrillic = mkOCSCyrillicWord

View File

@@ -12,7 +12,7 @@
-- (Description of the module)
-----------------------------------------------------------------------------
module Russian where
module Russian (mkRussian, mkRusKOI8) where
-- an ad hoc ASCII encoding. Delimiters: /_ _/
mkRussian :: String -> String

View File

@@ -12,7 +12,7 @@
-- (Description of the module)
-----------------------------------------------------------------------------
module Tamil where
module Tamil (mkTamil) where
mkTamil :: String -> String
mkTamil = digraphWordToUnicode . adHocToDigraphWord

View File

@@ -12,7 +12,7 @@
-- (Description of the module)
-----------------------------------------------------------------------------
module UTF8 where
module UTF8 (decodeUTF8, encodeUTF8) where
-- From the Char module supplied with HBC.
-- code by Thomas Hallgren (Jul 10 1999)

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