# Urdu 6 Dot Grade 1 Braille Table
#
#-index-name: Urdu, uncontracted
#-display-name: Urdu uncontracted braille
#-updated: 2023
#
#+language:ur
#+type:literary
#+contraction:no
#+grade:1
#
#  Copyright (C) 2018, 2020, 2021, 2023 by Compass Braille
#
#  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/>.
#
#  Prepared by Jake Kyle, Compass Braille, UK in consultation with Buta Masih
#  Contact: jake@compassbraille.org
#  www.compassbraille.org

# NB. If including an English table the letter sign must be disabled.

space \x00a0 a
include spaces.uti

include braille-patterns.cti

numsign 3456

replace \x200E               # left to right mark
replace \x200F               # right to left mark
replace \x0614               # Arabic Takhallus Sign - optional sign over proper names not used in Braille
replace \x200C               # Zero width non-joiner

punctuation \x00AB 236      # Left-pointing double angle quotation mark («)
punctuation \x00BB 356      # Right-pointing double angle quotation mark (»)

# Standard Arabic characters
#                               Name                     ASCII           Notes
punctuation \x060C 2            Arabic comma             1
punctuation \x061B 23           Arabic semicolon         2
punctuation \x061F 236          Arabic question mark     8
punctuation \x06D4 256          Arabic fullstop          4
letter \x0622 345               Alef with Madda above    >
letter \x0624 3-2456            Waw with Hamza above     'W              Modified 2020-02-25
letter \x0626 3                 Yeh with Hamza above     '               Different from arabic table
letter \x0627 1                 Alef                     A
letter \x0628 12                Beh                      B
letter \x062A 2345              Teh                      T
letter \x062B 1456              Theh                     ?
letter \x062C 245               Jeem                     J
letter \x062D 156               Hah                      :
letter \x062E 1346              Khah                     X
letter \x062F 145               Dal                      D
letter \x0630 2346              Thal                     !
letter \x0631 1235              Reh                      R
letter \x0632 1356              Zain                     Z
letter \x0633 234               Seen                     S
letter \x0634 146               Sheen                    %
letter \x0635 12346             Sad                      &
letter \x0636 1246              Dad                      $
letter \x0637 23456             Tah                      )
letter \x0638 123456            Zah                      =
letter \x0639 12356             Ain                      (
letter \x063A 126               Ghain                    <
letter \x0641 124               Feh                      F
letter \x0642 12345             Qaf                      Q
letter \x0644 123               Lam                      L
letter \x0645 134               Meem                     M
letter \x0646 1345              Noon                     N
letter \x0648 2456              Waw                      W
letter \x064B 23                Fathatan                 2
letter \x064E 2                 Fatha                    1
letter \x064F 136               Damma                    U
letter \x0650 15                Kasra                    E
letter \x0651 6                 Shadda                   ,

# Additional letters not defined in the standard Arabic table but used in Urdu.
letter \x0653 3                 Madda above              '
letter \x0654 3                 Hamza above              '
letter \x0670 4                 Superscript Alef         @
letter \x0679 246               Tteh                     [
letter \x067E 1234              Peh                      P
letter \x0686 14                Tcheh                    C
letter \x0688 346               Ddal                     +
letter \x0691 12456             Rreh                     ]
letter \x0698 346               Jeh                      +
letter \x06A9 13                Keheh                    K
letter \x06AF 1245              Gaf                      G
letter \x06BA 56                Noon Ghunna              ;
letter \x06BE 236               Heh Doachashmee          8
letter \x06C1 125               Heh Goal                 H                Not 236 as in Duxbury
letter \x06C2 125-3             Heh Goal with Hamza above H'
letter \x06C3 2345              Teh Marbuta Goal         T                Not 16 as in Duxbury
letter \x06CC 24                Yeh                      I
letter \x06D2 34                Yeh Barree               /
letter \xFDF2 1-6-123-4-125         Arabic Ligature Allah Isolated Form  A,L@H

# Standard Arabic letters not usually used in Urdu
letter \x0621 3                 Hamza                    '
letter \x0623 34                Alef with Hamza above    /
letter \x0643 13                Kaf                      K
letter \x0647 125               Heh                      H
letter \x064A 24                Yeh                      I

# Combined letter plus diacritic
noback always \x0627\x0653 345         Alef with Madda above    >
noback always \x064A\x0654 3           Yeh with Hamza above     '

# -----------------------------
# Numerals
# -----------------------------

# Extended Arabic Numerals - generally used in Urdu
digit \x06F0 245                0
digit \x06F1 1                  1
digit \x06F2 12                 2
digit \x06F3 14                 3
digit \x06F4 145                4
digit \x06F5 15                 5
digit \x06F6 124                6
digit \x06F7 1245               7
digit \x06F8 125                8
digit \x06F9 24                 9

litdigit \x06F0 245                0
litdigit \x06F1 1                  1
litdigit \x06F2 12                 2
litdigit \x06F3 14                 3
litdigit \x06F4 145                4
litdigit \x06F5 15                 5
litdigit \x06F6 124                6
litdigit \x06F7 1245               7
litdigit \x06F8 125                8
litdigit \x06F9 24                 9

# Arabic numerals
digit \x0660 245                0
digit \x0661 1                  1
digit \x0662 12                 2
digit \x0663 14                 3
digit \x0664 145                4
digit \x0665 15                 5
digit \x0666 124                6
digit \x0667 1245               7
digit \x0668 125                8
digit \x0669 24                 9

litdigit \x0660 245                0
litdigit \x0661 1                  1
litdigit \x0662 12                 2
litdigit \x0663 14                 3
litdigit \x0664 145                4
litdigit \x0665 15                 5
litdigit \x0666 124                6
litdigit \x0667 1245               7
litdigit \x0668 125                8
litdigit \x0669 24                 9

include digits6Dots.uti
include litdigits6Dots.uti

# --------------------------------

# Hamza above after Waw should go before
always \x0648\x0654 3-2456                   W'     'W
always \x0648\x0654\x064F 3-136-2456         W'U    'UW
always \x0648\x064F\x0654 3-136-2456         WU'    'UW

#-------------------------------------------------------------------------------------------------------
# Dealing with aspirated digraphs followed by Fatha (1), Kasra (E) or Damma (U).
# In the text file these vowel signs usually come before Heh Doachashmee whereas in Braille they must come after.  
#-------------------------------------------------------------------------------------------------------

#                                              ASCII as in text    ASCII in Braille
always \x0628\x064F\x06BE 12-236-136           BU8                 B8U
always \x0628\x0650\x06BE 12-236-15            BE8                 B8E
always \x067E\x0650\x06BE 1234-236-15          PE8                 P8E
always \x067E\x064E\x06BE 1234-236-2           P18                 P81
always \x067E\x064F\x06BE 1234-236-136         PU8                 P8U
always \x062A\x0650\x06BE 2345-236-15          TE8                 T8E
always \x0679\x0650\x06BE 246-236-15           [E8                 [8E
always \x0686\x0650\x06BE 14-236-15            CE8                 C8E
always \x0686\x064F\x06BE 14-236-136           CU8                 C8U
always \x06A9\x0650\x06BE 13-236-15            KE8                 K8E
always \x06A9\x064F\x06BE 13-236-136           KU8                 K8U
always \x06AF\x064F\x06BE 1245-236-136         GU8                 G8U
always \x062F\x064F\x06BE 145-236-136          DU8                 D8U
always \x062C\x064F\x06BE 245-236-136          JU8                 J8U
always \x062C\x0650\x06BE 245-236-15           JE8                 J8E
always \x0688\x064E\x06BE 346-236-2            +18                 +81
always \x0688\x064F\x06BE 346-236-136          +U8                 +8U

#-------------------------------------------------------------------------------------------
# Shadda (\x0651) goes after consonant in text file but must go before it in Braille
#-------------------------------------------------------------------------------------------

#                                                ASCII as in text ASCII in Braille     Notes
always \x0648\x0651 6-2456                       W,               ,W
always \x0641\x0651 6-124                        F,               ,F
always \x0642\x0651 6-12345                      Q,               ,Q
always \x0635\x0651 6-12346                      &,               ,&
always \x0646\x0651 6-1345                       N,               ,N
always \x0646\x0650\x0651 6-1345-15              NE,              ,NE
always \x0646\x0651\x062C 1345-6-245             N,J              N,J                  No change in this case
always \x0632\x0651 6-1356                       Z,               ,Z
always \x0631\x0651 6-1235                       R,               ,R
always \x0631\x0650\x0651 6-1235-15              RE,              ,RE
always \x0631\x064F\x0651 6-1235-136             RU,              ,RU
always \x06CC\x0651 6-24                         I,               ,I
always \x062C\x064F\x0651 6-245-136              JU,              ,JU
always \x06A9\x0651 6-13                         K,               ,K
always \x06A9\x06BE\x0651 6-13-236               K8,              ,K8
always \x062F\x0651 6-145                        D,               ,D
always \x0686\x0651 6-14                         C,               ,C
always \x0686\x06C1\x0651 6-14-125               CH,              ,CH
always \x0686\x06BE\x0651 6-14-236               C8,              ,C8
always \x062C\x0651 6-245                        J,               ,J
always \x0628\x0651 6-12                         B,               ,B
always \x0645\x0651 6-134                        M,               ,M
always \x062A\x0651 6-2345                       T,               ,T
always \x0644\x0651 6-123                        L,               ,L
always \x067E\x0651 6-1234                       P,               ,P
always \x0633\x0651 6-234                        S,               ,S
always \x0679\x0651 6-246                        [,               ,[
always \x0679\x06BE\x0651 6-246-236              [8,              ,[8
always \x0638\x0651 6-123456                     =,               ,=
always \x0688\x0651 6-346                        +,               ,+
always \x0634\x0651 6-146                        %,               ,%
always \x0637\x0651 6-23456                      ),               ,)
always \x0688\x0650\x0651 6-346-15               +E,              ,+E
always \x062A\x062A\x064E\x0651 6-2345-2345-2    TTE,             ,TTE
always \x062A\x0650\x0651 15-6-2345              TE,              E,T

#---end of table---#