# Vietnamese letters definitions
#
#-copyright: Sao Mai Center for the Blind <www.saomaicenter.org/en>
#-license: LGPLv2.1
#
#  Copyright (C) 2018, 2023 by Sao Mai Center for the Blind <www.saomaicenter.org/en>
#
#  This file is part of liblouis.
#
#  liblouis is free software: you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as
#  published by the Free Software Foundation, either version 2.1 of the
#  License, or (at your option) any later version.
#
#  liblouis is distributed in the hope that it will be useful, but
#  WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
#  Lesser General Public License for more details.
#
#  You should have received a copy of the GNU Lesser General Public
#  License along with liblouis. If not, see
#  <http://www.gnu.org/licenses/>.
#
# Created and maintained by: Dang Hoai Phuc, danghoaiphuc@gmail.com

# auto-converting Vietnamese unicode composit to built-in one

# Additional Vietnamese characters, mostly with accents
lowercase đ 2346
lowercase á 35-1          a acute accent
lowercase à 56-1
lowercase ả 26-1
lowercase ã 36-1
lowercase ạ 6-1
lowercase ă 345
lowercase ắ 35-345
lowercase ằ 56-345
lowercase ẳ 26-345
lowercase ẵ 36-345
lowercase ặ 6-345
lowercase â 16
lowercase ấ 35-16
lowercase ầ 56-16
lowercase ẩ 26-16
lowercase ẫ 36-16
lowercase ậ 6-16
lowercase é 35-15
lowercase è 56-15
lowercase ẻ 26-15
lowercase ẽ 36-15
lowercase ẹ 6-15
lowercase ê 126
lowercase ế 35-126
lowercase ề 56-126
lowercase ể 26-126
lowercase ễ 36-126
lowercase ệ 6-126
lowercase í 35-24
lowercase ì 56-24
lowercase ỉ 26-24
lowercase ĩ 36-24
lowercase ị 6-24
lowercase ó 35-135
lowercase ò 56-135
lowercase ỏ 26-135
lowercase õ 36-135
lowercase ọ 6-135
lowercase ô 1456
lowercase ố 35-1456
lowercase ồ 56-1456
lowercase ổ 26-1456
lowercase ỗ 36-1456
lowercase ộ 6-1456
lowercase ơ 246
lowercase ớ 35-246
lowercase ờ 56-246
lowercase ở 26-246
lowercase ỡ 36-246
lowercase ợ 6-246
lowercase ú 35-136
lowercase ù 56-136
lowercase ủ 26-136
lowercase ũ 36-136
lowercase ụ 6-136
lowercase ư 1256
lowercase ứ 35-1256
lowercase ừ 56-1256
lowercase ử 26-1256
lowercase ữ 36-1256
lowercase ự 6-1256
lowercase ý 35-13456
lowercase ỳ 56-13456
lowercase ỷ 26-13456
lowercase ỹ 36-13456
lowercase ỵ 6-13456

# special unicode characters might be used and have same shapes but with different char codes
# Proposed to use dot 4 to mark as foreign letter, then with original UEB sign, seems to be similar to its international phonetic.
#   Unicode Accented Letters

#uplow \x00c0 \x00e0 45-16-1 Àà
#uplow \x00c1 \x00e1 45-34-1 Áá
#uplow \x00c2 \x00e2 45-146-1 Ââ
#uplow \x00c3 \x00e3 45-12456-1 Ãã
lowercase \x00e4 4-25-1 Ää
#similar to standard Vietnamese letter a
lowercase \x00e5 1 å
lowercase \x00e7 4-12346-14 ç
#uplow \x00c8 \x00e8 45-16-15 Èè
#uplow \x00c9 \x00e9 45-34-15 Éé
#uplow \x00ca \x00ea 45-146-15 Êê
lowercase \x00eb 4-25-15 ë
#uplow \x00cc \x00ec 45-16-24 Ìì
#uplow \x00cd \x00ed 45-34-24 Íí
lowercase \x00ee 4-146-24  î
lowercase \x00ef 4-25-24 ï
# similar to letter đ
lowercase \x00f0 2346 ð
lowercase \x00f1 45-12456-1345 ñ
#uplow \x00d2 \x00f2 45-16-135 Òò
#uplow \x00d3 \x00f3 45-34-135 Óó
#uplow \x00d4 \x00f4 45-146-135 Ôô
#uplow \x00d5 \x00f5 45-12456-135 Õõ
lowercase \x00f6 4-25-135 ö
#similar to letter o
lowercase \x00f8 135 ø
#uplow \x00d9 \x00f9 45-16-136 Ùù
#uplow \x00da \x00fa 45-34-136 Úú
lowercase \x00fb 4-146-136 û
lowercase \x00fc 4-25-136 ü
lowercase \x00fe 4-3456-2346 þ
#uplow \x00dd \x00fd 45-34-13456 Ýý

#similar to letter a
lowercase \x0101 1 ā
#uplow \x0102 \x0103 4-346-1 Ăă
# same with letter c
lowercase \x0107 14 ć
lowercase \x0109 14 ĉ
lowercase \x010d 14 č
#same with letter e
lowercase \x0113 15 ē
lowercase \x0115 15 ĕ
lowercase \x011b 15 ě
#same with g
lowercase \x011d 1245 ĝ
lowercase \x011f 1245 ğ
#same with h
lowercase \x0125 125 ĥ
lowercase \x0127 125 ħ
#same with i
lowercase \x012b 24 ī
lowercase \x012d 24 ĭ
#same o
lowercase \x014d 135 ō
lowercase \x014f 135 ŏ
#same t
lowercase \x0167 2345 ŧ
#same u
lowercase \x016b 136 ū
lowercase \x016d 136 ŭ

lowercase \x00ff 4-25-13456 ÿ

# Early Forms of English
lowercase \x021d 4-3456-13456 ȝ yogh
lowercase \x00fe 4-3456-2346 þ thorn
#same letter đ
lowercase \x00f0 2346 ð eth
lowercase \x01bf 4-3456-2456 ƿ wynn (wen)

# Uppercase letters
base uppercase Đ đ
base uppercase Á á          a accent grave
base uppercase À à
base uppercase Ả ả
base uppercase Ã ã
base uppercase Ạ ạ
base uppercase Ă ă
base uppercase Ắ ắ
base uppercase Ằ ằ
base uppercase Ẳ ẳ
base uppercase Ẵ ẵ
base uppercase Ặ ặ
base uppercase Â â
base uppercase Ấ ấ
base uppercase Ầ ầ
base uppercase Ẩ ẩ
base uppercase Ẫ ẫ
base uppercase Ậ ậ
base uppercase É é
base uppercase È è
base uppercase Ẻ ẻ
base uppercase Ẽ ẽ
base uppercase Ẹ ẹ
base uppercase Ê ê
base uppercase Ế ế
base uppercase Ề ề
base uppercase Ể ể
base uppercase Ễ ễ
base uppercase Ệ ệ
base uppercase Í í
base uppercase Ì ì
base uppercase Ỉ ỉ
base uppercase Ĩ ĩ
base uppercase Ị ị
base uppercase Ó ó
base uppercase Ò ò
base uppercase Ỏ ỏ
base uppercase Õ õ
base uppercase Ọ ọ
base uppercase Ô ô
base uppercase Ố ố
base uppercase Ồ ồ
base uppercase Ổ ổ
base uppercase Ỗ ỗ
base uppercase Ộ ộ
base uppercase Ơ ơ
base uppercase Ớ ớ
base uppercase Ờ ờ
base uppercase Ở ở
base uppercase Ỡ ỡ
base uppercase Ợ ợ
base uppercase Ú ú
base uppercase Ù ù
base uppercase Ủ ủ
base uppercase Ũ ũ
base uppercase Ụ ụ
base uppercase Ư ư
base uppercase Ứ ứ
base uppercase Ừ ừ
base uppercase Ử ử
base uppercase Ữ ữ
base uppercase Ự ự
base uppercase Ý ý
base uppercase Ỳ ỳ
base uppercase Ỷ ỷ
base uppercase Ỹ ỹ
base uppercase Ỵ ỵ
base uppercase \x00c4 \x00e4 Ää
base uppercase \x00c5 \x00e5 Åå
base uppercase \x00c7 \x00e7 Çç
base uppercase \x00cb \x00eb Ëë
base uppercase \x00ce \x00ee Îî
base uppercase \x00cf \x00ef Ïï
base uppercase \x00d0 \x00f0 Ðð
base uppercase \x00d1 \x00f1 Ññ
base uppercase \x00d6 \x00f6 Öö
base uppercase \x00d8 \x00f8 Øø
base uppercase \x00db \x00fb Ûû
base uppercase \x00dc \x00fc Üü
base uppercase \x00de \x00fe Þþ
base uppercase \x0100 \x0101 Āā
base uppercase \x0106 \x0107 Ćć
base uppercase \x0108 \x0109 Ĉĉ
base uppercase \x010c \x010d Čč
base uppercase \x0112 \x0113 Ēē
base uppercase \x0114 \x0115 Ĕĕ
base uppercase \x011a \x011b Ěě
base uppercase \x011c \x011d Ĝĝ
base uppercase \x011e \x011f Ğğ
base uppercase \x0124 \x0125 Ĥĥ
base uppercase \x0126 \x0127 Ħħ
base uppercase \x012a \x012b Īī
base uppercase \x012c \x012d Ĭĭ
base uppercase \x014c \x014d Ōō
base uppercase \x014e \x014f Ŏŏ
base uppercase \x0166 \x0167 Ŧŧ
base uppercase \x016a \x016b Ūū
base uppercase \x016c \x016d Ŭŭ
base uppercase \x0178 \x00ff Ÿÿ
base uppercase \x021c \x021d Ȝȝ yogh
base uppercase \x00de \x00fe Þþ thorn
base uppercase \x00d0 \x00f0 Ðð eth
base uppercase \x01f7 \x01bf Ƿƿ wynn (wen)

# converting composit to built-in unicode
noback correct "a""\x0301" "á"
noback correct "a""\x0300" "à"
noback correct "a""\x0309" "ả"
noback correct "a""\x0303" "ã"
noback correct "a""\x0323" "ạ"

noback correct "ă""\x0301" "ắ"
noback correct "ă""\x0300" "ằ"
noback correct "ă""\x0309" "ẳ"
noback correct "ă""\x0303" "ẵ"
noback correct "ă""\x0323" "ặ"

noback correct "â""\x0301" "ấ"
noback correct "â""\x0300" "ầ"
noback correct "â""\x0309" "ẩ"
noback correct "â""\x0303" "ẫ"
noback correct "â""\x0323" "ậ"

noback correct "e""\x0301" "é"
noback correct "e""\x0300" "è"
noback correct "e""\x0309" "ẻ"
noback correct "e""\x0303" "ẽ"
noback correct "e""\x0323" "ẹ"

noback correct "ê""\x0301" "ế"
noback correct "ê""\x0300" "ề"
noback correct "ê""\x0309" "ể"
noback correct "ê""\x0303" "ễ"
noback correct "ê""\x0323" "ệ"

noback correct "i""\x0301" "í"
noback correct "i""\x0300" "ì"
noback correct "i""\x0309" "ỉ"
noback correct "i""\x0303" "ĩ"
noback correct "i""\x0323" "ị"

noback correct "o""\x0301" "ó"
noback correct "o""\x0300" "ò"
noback correct "o""\x0309" "ỏ"
noback correct "o""\x0303" "õ"
noback correct "o""\x0323" "ọ"

noback correct "ô""\x0301" "ố"
noback correct "ô""\x0300" "ồ"
noback correct "ô""\x0309" "ổ"
noback correct "ô""\x0303" "ỗ"
noback correct "ô""\x0323" "ộ"

noback correct "ơ""\x0301" "ớ"
noback correct "ơ""\x0300" "ờ"
noback correct "ơ""\x0309" "ở"
noback correct "ơ""\x0303" "ỡ"
noback correct "ơ""\x0323" "ợ"

noback correct "u""\x0301" "ú"
noback correct "u""\x0300" "ù"
noback correct "u""\x0309" "ủ"
noback correct "u""\x0303" "ũ"
noback correct "u""\x0323" "ụ"

noback correct "ư""\x0301" "ứ"
noback correct "ư""\x0300" "ừ"
noback correct "ư""\x0309" "ử"
noback correct "ư""\x0303" "ữ"
noback correct "ư""\x0323" "ự"

noback correct "y""\x0301" "ý"
noback correct "y""\x0300" "ỳ"
noback correct "y""\x0309" "ỷ"
noback correct "y""\x0303" "ỹ"
noback correct "y""\x0323" "ỵ"

# Greek lower letters
noback letter \x03b1 56-1 α Alpha
letter \x03b2 56-12 β Beta
letter \x03b3 56-1245 γ Gamma
letter \x03b4 56-145 δ Delta
noback letter \x03b5 56-15 ε Epsilon
letter \x03b6 56-1356 ζ Zeta
letter \x03b7 56-156 η Eta
noback letter \x03b8 56-1456 θ Theta
noback letter \x03b9 56-24 ι Iota
letter \x03ba 56-13 κ Kappa
letter \x03bb 56-123 λ Lamda
letter \x03bc 56-134 μ Mu
letter \x03bd 56-1345 ν Nu
letter \x03be 56-1346 ξ Xi
noback letter \x03bf 56-135 ο Omicron
letter \x03c0 56-1234 π Pi
letter \x03c1 56-1235 ρ Rho
letter \x03c3 56-234 σ Sigma
letter \x03c4 56-2345 τ Tau
noback letter \x03c5 56-136 υ Upsilon
letter \x03c6 56-124 φ Phi
letter \x03c7 56-12346 χ Chi
noback letter \x03c8 56-13456 ψ Psi
letter \x03c9 56-2456 ω Omega
noback letter \x03c2 56-234 ς Small Letter Sigma
# Greek upper letters
noback letter \x0391 456-1 α Alpha
letter \x0392 456-12 β Beta
letter \x0393 456-1245 γ Gamma
letter \x0394 456-145 δ Delta
noback letter \x0395 456-15 ε Epsilon
letter \x0396 456-1356 ζ Zeta
letter \x0397 456-156 η Eta
noback letter \x0398 456-1456 θ Theta
noback letter \x0399 456-24 ι Iota
letter \x039a 456-13 κ Kappa
letter \x039b 456-123 λ Lamda
letter \x039c 456-134 μ Mu
letter \x039d 456-1345 ν Nu
letter \x039e 456-1346 ξ Xi
noback letter \x039f 456-135 ο Omicron
letter \x03a0 456-1234 π Pi
letter \x03c1 456-1235 ρ Rho
letter \x03a3 456-234 σ Sigma
letter \x03a4 456-2345 τ Tau
noback letter \x03a5 456-136 υ Upsilon
letter \x03a6 456-124 φ Phi
letter \x03a7 456-12346 χ Chi
noback letter \x03a8 456-13456 ψ Psi
letter \x03a9 456-2456 ω Omega

