diff --git a/examples/numerals/thai.gf b/examples/numerals/thai.gf index da6648a42..fcb2c7bcb 100644 --- a/examples/numerals/thai.gf +++ b/examples/numerals/thai.gf @@ -3,6 +3,8 @@ include numerals.Abs.gf ; -- Thai transliteration, produces thaiU.gf by GF/Text/Thai.hs -- AR 28/12/2006 +flags coding=utf8 ; + lincat Numeral = {s : Str} ; Digit = {s : DForm => Str} ; @@ -18,10 +20,10 @@ lin n2 = mkNum "s-Og" "y'i:E" "s-Og" ; n3 = regNum "s-a:m" ; - n4 = regNum "s-i:E" ; - n5 = regNum "ha:E" ; + n4 = regNum "s-i:E" ; -- E = E48 ' + n5 = regNum "hTa:" ; -- T = E49 9 n6 = regNum "ho?k" ; - n7 = regNum "ecMd'" ; + n7 = regNum "ecMd'" ; -- M = E47 w n8 = regNum "e:pd'" ; n9 = regNum "eka:" ; @@ -63,5 +65,5 @@ oper sip = table {Unit => "s'ib" ; Thousand => "hmv:En"} ; - roy = table {Unit => "rEOy'" ; Thousand => "se:n"} ; + roy = table {Unit => "rTOy'" ; Thousand => "se:n"} ; phan = table {Unit => [] ; Thousand => "p2an"} ; diff --git a/examples/numerals/thaiU.gf b/examples/numerals/thaiU.gf index 61777416d..a5f6ca685 100644 --- a/examples/numerals/thaiU.gf +++ b/examples/numerals/thaiU.gf @@ -1,6 +1,7 @@ include numerals.Abs.gf ; --- Thai UTF8, produced from thai.gf by GF/Text/Thai.hs. AR 28/12/2006 +-- Thai transliteration, produces thaiU.gf by GF/Text/Thai.hs +-- AR 28/12/2006 flags coding=utf8 ; @@ -19,10 +20,10 @@ lin n2 = mkNum "สอง" "ยี่" "สอง" ; n3 = regNum "สาม" ; - n4 = regNum "สี่" ; - n5 = regNum "หา่" ; + n4 = regNum "สี่" ; -- E = E48 ' + n5 = regNum "ห้า" ; -- T = E49 9 n6 = regNum "หก" ; - n7 = regNum "เจ็ด" ; + n7 = regNum "เจ็ด" ; -- M = E47 w n8 = regNum "แปด" ; n9 = regNum "เกา" ; @@ -64,5 +65,5 @@ oper sip = table {Unit => "ศิบ" ; Thousand => "หมื่น"} ; - roy = table {Unit => "ร่อย" ; Thousand => "ซแน"} ; + roy = table {Unit => "ร้อย" ; Thousand => "ซแน"} ; phan = table {Unit => [] ; Thousand => "พะน"} ; diff --git a/src/GF/Text/Thai.hs b/src/GF/Text/Thai.hs index 7fede0676..e6c1f8003 100644 --- a/src/GF/Text/Thai.hs +++ b/src/GF/Text/Thai.hs @@ -102,12 +102,13 @@ thaiFinalMap = Map.fromList $ zip allThaiTrans finals thaiTable :: String thaiTable = unlines [ + "\t" ++ hex c ++ "\t" ++ encodeUTF8 (showThai s) ++ "\t" ++ s ++ "\t" ++ pronThai s ++ "\t" ++ [f] ++ "\t" ++ - [q] + [q] ++ "\t" | (c,q,f,s) <- zip4 allThaiCodes heights finals allThaiTrans ] @@ -119,7 +120,7 @@ showThai s = case s of pronThai s = case s of [c,p] - | isUpper c && isDigit p -> show p + | isUpper c && isDigit p -> [p] | isDigit p -> c:"h" | p==':' -> c:[c] | elem p "%&" -> c:"y"