###############################################################################
# BRLTTY - A background process providing access to the Linux console (when in
#          text mode) for a blind person using a refreshable braille display.
#
# Copyright (C) 1995-2004 by The BRLTTY Team. All rights reserved.
#
# BRLTTY comes with ABSOLUTELY NO WARRANTY.
#
# This is free software, placed under the terms of the
# GNU General Public License, as published by the Free Software
# Foundation.  Please see the file COPYING for details.
#
# Web Page: http://mielke.cc/brltty/
#
# This software is maintained by Dave Mielke <dave@mielke.cc>.
###############################################################################

########################################################################
# BRLTTY Text Translation Table - North American Braille Computer Code #
########################################################################

# This is a description of the default text translation table used by BRLTTY.  
# It's based on the North American Braille Computer Code, but defines the full
# Latin1 (ISO-8859-1) character set.

# The 95 printable characters of the standard 7-bit US-ASCII character set
# (32-126) are identical to their representations within the North American
# Braille Computer Code (these are the only characters which the NABCC actually
# defines). Characters from literary braille, symbols from The Nemeth Braille
# Code for Mathematics and Science Notation, and a bit of human imagination
# have all been combined to create an easy-to-remember, one-to-one mapping
# between each character and its braille counterpart. All possible combinations
# involving only the original 6 braille dots are used, but that only allows for
# 64 out of the required 95 character representations. The presence or absence
# of dot 7 is used to differentiate between pairs of characters which either
# are very closely related in meaning or, in a few cases where a more intuitive
# reason couldn't be found, have a very close logical relationship within the
# US-ASCII code. Dot 8 isn't used at all.

# The space and the 26 lowercase letters (a-z) are the same as in literary 
# braille:

   #Hex    Dots       Dec Char Description
   \X20 (        )  #  32      space
   \X61 (1       )  #  97   a  latin small letter a
   \X62 (12      )  #  98   b  latin small letter b
   \X63 (1  4    )  #  99   c  latin small letter c
   \X64 (1  45   )  # 100   d  latin small letter d
   \X65 (1   5   )  # 101   e  latin small letter e
   \X66 (12 4    )  # 102   f  latin small letter f
   \X67 (12 45   )  # 103   g  latin small letter g
   \X68 (12  5   )  # 104   h  latin small letter h
   \X69 ( 2 4    )  # 105   i  latin small letter i
   \X6A ( 2 45   )  # 106   j  latin small letter j
   \X6B (1 3     )  # 107   k  latin small letter k
   \X6C (123     )  # 108   l  latin small letter l
   \X6D (1 34    )  # 109   m  latin small letter m
   \X6E (1 345   )  # 110   n  latin small letter n
   \X6F (1 3 5   )  # 111   o  latin small letter o
   \X70 (1234    )  # 112   p  latin small letter p
   \X71 (12345   )  # 113   q  latin small letter q
   \X72 (123 5   )  # 114   r  latin small letter r
   \X73 ( 234    )  # 115   s  latin small letter s
   \X74 ( 2345   )  # 116   t  latin small letter t
   \X75 (1 3  6  )  # 117   u  latin small letter u
   \X76 (123  6  )  # 118   v  latin small letter v
   \X77 ( 2 456  )  # 119   w  latin small letter w
   \X78 (1 34 6  )  # 120   x  latin small letter x
   \X79 (1 3456  )  # 121   y  latin small letter y
   \X7A (1 3 56  )  # 122   z  latin small letter z

# The 26 uppercase letters (A-Z) are the same as their lowercase counterparts 
# except that dot 7 is added:

   #Hex    Dots       Dec Char Description
   \X41 (1     7 )  #  65   A  latin capital letter a
   \X42 (12    7 )  #  66   B  latin capital letter b
   \X43 (1  4  7 )  #  67   C  latin capital letter c
   \X44 (1  45 7 )  #  68   D  latin capital letter d
   \X45 (1   5 7 )  #  69   E  latin capital letter e
   \X46 (12 4  7 )  #  70   F  latin capital letter f
   \X47 (12 45 7 )  #  71   G  latin capital letter g
   \X48 (12  5 7 )  #  72   H  latin capital letter h
   \X49 ( 2 4  7 )  #  73   I  latin capital letter i
   \X4A ( 2 45 7 )  #  74   J  latin capital letter j
   \X4B (1 3   7 )  #  75   K  latin capital letter k
   \X4C (123   7 )  #  76   L  latin capital letter l
   \X4D (1 34  7 )  #  77   M  latin capital letter m
   \X4E (1 345 7 )  #  78   N  latin capital letter n
   \X4F (1 3 5 7 )  #  79   O  latin capital letter o
   \X50 (1234  7 )  #  80   P  latin capital letter p
   \X51 (12345 7 )  #  81   Q  latin capital letter q
   \X52 (123 5 7 )  #  82   R  latin capital letter r
   \X53 ( 234  7 )  #  83   S  latin capital letter s
   \X54 ( 2345 7 )  #  84   T  latin capital letter t
   \X55 (1 3  67 )  #  85   U  latin capital letter u
   \X56 (123  67 )  #  86   V  latin capital letter v
   \X57 ( 2 4567 )  #  87   W  latin capital letter w
   \X58 (1 34 67 )  #  88   X  latin capital letter x
   \X59 (1 34567 )  #  89   Y  latin capital letter y
   \X5A (1 3 567 )  #  90   Z  latin capital letter z

# The 10 decimal digits (0-9) are the same as in the Nemeth Code:

   #Hex    Dots       Dec Char Description
   \X30 (  3 56  )  #  48   0  digit zero
   \X31 ( 2      )  #  49   1  digit one
   \X32 ( 23     )  #  50   2  digit two
   \X33 ( 2  5   )  #  51   3  digit three
   \X34 ( 2  56  )  #  52   4  digit four
   \X35 ( 2   6  )  #  53   5  digit five
   \X36 ( 23 5   )  #  54   6  digit six
   \X37 ( 23 56  )  #  55   7  digit seven
   \X38 ( 23  6  )  #  56   8  digit eight
   \X39 (  3 5   )  #  57   9  digit nine

# Common symbols used within mathematical expressions by popular computer
# programming languages are the same as in the Nemeth Code:

   #Hex    Dots       Dec Char Description
   \X2E (   4 6  )  #  46   .  full stop
   \X2B (  34 6  )  #  43   +  plus sign
   \X2D (  3  6  )  #  45   -  hyphen-minus
   \X2A (1    6  )  #  42   *  asterisk
   \X2F (  34    )  #  47   /  solidus
   \X28 (123 56  )  #  40   (  left parenthesis
   \X29 ( 23456  )  #  41   )  right parenthesis

# With all of these major considerations having been taken into account, 
# convenient representations were still available, and are used, for some of 
# the remaining characters:

   #Hex    Dots       Dec Char Description
   \X26 (1234 6  )  #  38   &  ampersand
   \X23 (  3456  )  #  35   #  number sign

# The remaining characters are what they are. Dot 7 isn't used either within 
# the number block (32-63) or, with the exception of the DEL control character
# (127), within the lowercase block (96-127). With the exception of the
# underscore (95), dot 7 is used for every character within the uppercase block
# (64-95). Adding dot 7 to any character within the lowercase block (96-127)
# yields its corresponding character within the uppercase block (64-95) except
# that removing dot 7 from the DEL control character yields the underscore.

   #Hex    Dots       Dec Char Description
   \X2C (     6  )  #  44   ,  comma
   \X3B (    56  )  #  59   ;  semicolon
   \X3A (1   56  )  #  58   :  colon
   \X21 ( 234 6  )  #  33   !  exclamation mark
   \X3F (1  456  )  #  63   ?  question mark
   \X22 (    5   )  #  34   "  quotation mark
   \X27 (  3     )  #  39   '  apostrophe
   \X60 (   4    )  #  96   `  grave accent
   \X5E (   45 7 )  #  94   ^  circumflex accent
   \X7E (   45   )  # 126   ~  tilde
   \X5B ( 2 4 67 )  #  91   [  left square bracket
   \X5D (12 4567 )  #  93   ]  right square bracket
   \X7B ( 2 4 6  )  # 123   {  left curly bracket
   \X7D (12 456  )  # 125   }  right curly bracket
   \X3D (123456  )  #  61   =  equals sign
   \X3C (12   6  )  #  60   <  less-than sign
   \X3E (  345   )  #  62   >  greater-than sign
   \X24 (12 4 6  )  #  36   $  dollar sign
   \X25 (1  4 6  )  #  37   %  percent sign
   \X40 (   4  7 )  #  64   @  commercial at
   \X7C (12  56  )  # 124   |  vertical line
   \X5C (12  567 )  #  92   \  reverse solidus
   \X5F (   456  )  #  95   _  low line

# Each of the characters within the basic control character block (0-31) is the
# same as its corresponding character within both the uppercase block (64-95)
# and the lowercase block (96-127) except that dots 7 and 8 are both used.

   #Hex    Dots       Dec Char Description
   \X00 (   4  78)  #   0  ^@  null
   \X01 (1     78)  #   1  ^A  start of heading
   \X02 (12    78)  #   2  ^B  start of text
   \X03 (1  4  78)  #   3  ^C  end of text
   \X04 (1  45 78)  #   4  ^D  end of transmission
   \X05 (1   5 78)  #   5  ^E  enquiry
   \X06 (12 4  78)  #   6  ^F  acknowledge
   \X07 (12 45 78)  #   7  ^G  bell
   \X08 (12  5 78)  #   8  ^H  backspace
   \X09 ( 2 4  78)  #   9  ^I  horizontal tabulation
   \X0A ( 2 45 78)  #  10  ^J  line feed
   \X0B (1 3   78)  #  11  ^K  vertical tabulation
   \X0C (123   78)  #  12  ^L  form feed
   \X0D (1 34  78)  #  13  ^M  carriage return
   \X0E (1 345 78)  #  14  ^N  shift out
   \X0F (1 3 5 78)  #  15  ^O  shift in
   \X10 (1234  78)  #  16  ^P  data link escape
   \X11 (12345 78)  #  17  ^Q  device control one
   \X12 (123 5 78)  #  18  ^R  device control two
   \X13 ( 234  78)  #  19  ^S  device control three
   \X14 ( 2345 78)  #  20  ^T  device control four
   \X15 (1 3  678)  #  21  ^U  negative acknowledge
   \X16 (123  678)  #  22  ^V  synchronous idle
   \X17 ( 2 45678)  #  23  ^W  end of transmission block
   \X18 (1 34 678)  #  24  ^X  cancel
   \X19 (1 345678)  #  25  ^Y  end of medium
   \X1A (1 3 5678)  #  26  ^Z  substitute
   \X1B ( 2 4 678)  #  27  ^[  escape
   \X1C (12  5678)  #  28  ^\  file separator
   \X1D (12 45678)  #  29  ^]  group separator
   \X1E (   45 78)  #  30  ^^  record separator
   \X1F (   45678)  #  31  ^_  unit separator

# Each of the characters within the extended control character block (128-159)  
# is the same as its corresponding character within the basic control character
# block (0-31) except that only dot 8 is used.

   #Hex    Dots       Dec Char Description
   \X80 (   4   8)  # 128  ~@  <control>
   \X81 (1      8)  # 129  ~A  <control>
   \X82 (12     8)  # 130  ~B  break permitted here
   \X83 (1  4   8)  # 131  ~C  no break here
   \X84 (1  45  8)  # 132  ~D  <control>
   \X85 (1   5  8)  # 133  ~E  next line
   \X86 (12 4   8)  # 134  ~F  start of selected area
   \X87 (12 45  8)  # 135  ~G  end of selected area
   \X88 (12  5  8)  # 136  ~H  character tabulation set
   \X89 ( 2 4   8)  # 137  ~I  character tabulation with justification
   \X8A ( 2 45  8)  # 138  ~J  line tabulation set
   \X8B (1 3    8)  # 139  ~K  partial line down
   \X8C (123    8)  # 140  ~L  partial line up
   \X8D (1 34   8)  # 141  ~M  reverse line feed
   \X8E (1 345  8)  # 142  ~N  single shift two
   \X8F (1 3 5  8)  # 143  ~O  single shift three
   \X90 (1234   8)  # 144  ~P  device control string
   \X91 (12345  8)  # 145  ~Q  private use one
   \X92 (123 5  8)  # 146  ~R  private use two
   \X93 ( 234   8)  # 147  ~S  set transmit state
   \X94 ( 2345  8)  # 148  ~T  cancel character
   \X95 (1 3  6 8)  # 149  ~U  message waiting
   \X96 (123  6 8)  # 150  ~V  start of guarded area
   \X97 ( 2 456 8)  # 151  ~W  end of guarded area
   \X98 (1 34 6 8)  # 152  ~X  start of string
   \X99 (1 3456 8)  # 153  ~Y  <control>
   \X9A (1 3 56 8)  # 154  ~Z  single character introducer
   \X9B ( 2 4 6 8)  # 155  ~[  control sequence introducer
   \X9C (12  56 8)  # 156  ~\  string terminator
   \X9D (12 456 8)  # 157  ~]  operating system command
   \X9E (   45  8)  # 158  ~^  privacy message
   \X9F (   456 8)  # 159  ~_  application program command

# Representations for the uppercase accented letters are drawn from the
# remaining combinations which use both dots 7 and 8. The representation for a
# lowercase accented letter is the same as its uppercase counterpart except
# that dot 7 isn't used. This scheme retains the use of dot 7 as the modifier
# for a capitalized letter. The only exception to these rules is that, due to
# the nature of the Latin1 character set, the German lowercase double-s is
# treated as though it were an uppercase y-dieresis (neither has an uppercase
# definition). These representations have been gathered, as much as possible,
# into logical groupings.

# The 5 letters with a circumflex accent (^) use the [1-5] dot combinations:

   #Hex    Dots       Dec Char Description
   \XC2 ( 2    78)  # 194   Â  latin capital letter a with circumflex
   \XCA ( 23   78)  # 202   Ê  latin capital letter e with circumflex
   \XCE ( 2  5 78)  # 206   Î  latin capital letter i with circumflex
   \XD4 ( 2  5678)  # 212   Ô  latin capital letter o with circumflex
   \XDB ( 2   678)  # 219   Û  latin capital letter u with circumflex
   \XE2 ( 2     8)  # 226   â  latin small letter a with circumflex
   \XEA ( 23    8)  # 234   ê  latin small letter e with circumflex
   \XEE ( 2  5  8)  # 238   î  latin small letter i with circumflex
   \XF4 ( 2  56 8)  # 244   ô  latin small letter o with circumflex
   \XFB ( 2   6 8)  # 251   û  latin small letter u with circumflex

# The 5 letters with a grave accent (`) use the [6-0] dot combinations:

   #Hex    Dots       Dec Char Description
   \XC0 ( 23 5 78)  # 192   À  latin capital letter a with grave
   \XC8 ( 23 5678)  # 200   È  latin capital letter e with grave
   \XCC ( 23  678)  # 204   Ì  latin capital letter i with grave
   \XD2 (  3 5 78)  # 210   Ò  latin capital letter o with grave
   \XD9 (  3 5678)  # 217   Ù  latin capital letter u with grave
   \XE0 ( 23 5  8)  # 224   à  latin small letter a with grave
   \XE8 ( 23 56 8)  # 232   è  latin small letter e with grave
   \XEC ( 23  6 8)  # 236   ì  latin small letter i with grave
   \XF2 (  3 5  8)  # 242   ò  latin small letter o with grave
   \XF9 (  3 56 8)  # 249   ù  latin small letter u with grave

# The 6 letters with an acute accent (') use the [a-f] dot combinations with
# dots 3 and 6 added:

   #Hex    Dots       Dec Char Description
   \XC1 (1    678)  # 193   Á  latin capital letter a with acute
   \XC9 (12   678)  # 201   É  latin capital letter e with acute
   \XCD (1  4 678)  # 205   Í  latin capital letter i with acute
   \XD3 (1  45678)  # 211   Ó  latin capital letter o with acute
   \XDA (1   5678)  # 218   Ú  latin capital letter u with acute
   \XDD (12 4 678)  # 221   Ý  latin capital letter y with acute
   \XE1 (1    6 8)  # 225   á  latin small letter a with acute
   \XE9 (12   6 8)  # 233   é  latin small letter e with acute
   \XED (1  4 6 8)  # 237   í  latin small letter i with acute
   \XF3 (1  456 8)  # 243   ó  latin small letter o with acute
   \XFA (1   56 8)  # 250   ú  latin small letter u with acute
   \XFD (12 4 6 8)  # 253   ý  latin small letter y with acute

# The 6 letters with a dieresis accent (") use the [f-j] dot combinations with
# dots 3 and 6 added, and the number sign (because it fits the sequence
# reasonably well):

   #Hex    Dots       Dec Char Description
   \XC4 (1234 678)  # 196   Ä  latin capital letter a with diaeresis
   \XCB (12345678)  # 203   Ë  latin capital letter e with diaeresis
   \XCF (123 5678)  # 207   Ï  latin capital letter i with diaeresis
   \XD6 ( 234 678)  # 214   Ö  latin capital letter o with diaeresis
   \XDC ( 2345678)  # 220   Ü  latin capital letter u with diaeresis
   \XE4 (1234 6 8)  # 228   ä  latin small letter a with diaeresis
   \XEB (123456 8)  # 235   ë  latin small letter e with diaeresis
   \XEF (123 56 8)  # 239   ï  latin small letter i with diaeresis
   \XF6 ( 234 6 8)  # 246   ö  latin small letter o with diaeresis
   \XFC ( 23456 8)  # 252   ü  latin small letter u with diaeresis
   \XFF (  3456 8)  # 255   ÿ  latin small letter y with diaeresis

# There is no uppercase y-dieresis in the Latin1 character set. The German
# lowercase double-s, which also doesn't have an uppercase counterpart in the
# Latin1 character set, uses its representation:

   #Hex    Dots       Dec Char Description
   \XDF (  345678)  # 223   ß  latin small letter sharp s

# The remaining accented letters are:

   #Hex    Dots       Dec Char Description
   \XC3 (    5 78)  # 195   Ã  latin capital letter a with tilde
   \XD1 (   4 678)  # 209   Ñ  latin capital letter n with tilde
   \XD5 (    5678)  # 213   Õ  latin capital letter o with tilde
   \XC5 (  345 78)  # 197   Å  latin capital letter a with ring above
   \XC7 (  34 678)  # 199   Ç  latin capital letter c with cedilla
   \XD8 (  34  78)  # 216   Ø  latin capital letter o with stroke
   \XC6 (  3   78)  # 198   Æ  latin capital letter ae
   \XD0 (     678)  # 208   Ð  latin capital letter eth
   \XDE (  3  678)  # 222   Þ  latin capital letter thorn
   \XE3 (    5  8)  # 227   ã  latin small letter a with tilde
   \XF1 (   4 6 8)  # 241   ñ  latin small letter n with tilde
   \XF5 (    56 8)  # 245   õ  latin small letter o with tilde
   \XE5 (  345  8)  # 229   å  latin small letter a with ring above
   \XE7 (  34 6 8)  # 231   ç  latin small letter c with cedilla
   \XF8 (  34   8)  # 248   ø  latin small letter o with stroke
   \XE6 (  3    8)  # 230   æ  latin small letter ae
   \XF0 (     6 8)  # 240   ð  latin small letter eth
   \XFE (  3  6 8)  # 254   þ  latin small letter thorn

# Some characters are the same as other characters which they resemble but with
# dot 7 added:

   #Hex    Dots       Dec Char Description
   \XAD (  3  67 )  # 173   ­  soft hyphen
   \XAB (12   67 )  # 171   «  left-pointing double angle quotation mark
   \XBB (  345 7 )  # 187   »  right-pointing double angle quotation mark
   \XA6 (1   567 )  # 166   ¦  broken bar
   \XB9 ( 2    7 )  # 185   ¹  superscript one
   \XB2 ( 23   7 )  # 178   ²  superscript two
   \XB3 ( 2  5 7 )  # 179   ³  superscript three
   \XB1 (  34 67 )  # 177   ±  plus-minus sign
   \XD7 (1    67 )  # 215   ×  multiplication sign
   \XF7 (  34  7 )  # 247   ÷  division sign
   \XB7 (   4 67 )  # 183   ·  middle dot
   \XA1 ( 234 67 )  # 161   ¡  inverted exclamation mark
   \XBF (1  4567 )  # 191   ¿  inverted question mark
   \XA2 (12 4 67 )  # 162   ¢  cent sign
   \XA3 (  34567 )  # 163   £  pound sign

# A few more characters follow this same convention but they're relationships
# to their base characters is a bit obscure:

   #Hex    Dots       Dec Char Description
   \XA4 (1  4 67 )  # 164   ¤  currency sign
   \XA5 (1234 67 )  # 165   ¥  yen sign

# Some characters are represented by the first letters of their names lowered
# by one row of dots:

   #Hex    Dots       Dec Char Description
   \XAC ( 2  567 )  # 172   ¬  not sign
   \XB6 ( 23 5 7 )  # 182   ¶  pilcrow sign
   \XA9 ( 23 567 )  # 169   ©  copyright sign
   \XAE ( 23  67 )  # 174   ®  registered sign
   \XA7 (  3 5 7 )  # 167   §  section sign
   \XB0 (  3 567 )  # 176   °  degree sign

# The three fraction characters use combinations of dots 1 and 4 (which
# progress from left to right as the value of the fraction increases) together
# with dots 2,3,5,6,7:

   #Hex    Dots       Dec Char Description
   \XBC (123 567 )  # 188   ¼  vulgar fraction one quarter
   \XBD (1234567 )  # 189   ½  vulgar fraction one half
   \XBE ( 234567 )  # 190   ¾  vulgar fraction three quarters

# Each of the three extended accent characters is the same as its conventional
# compose character but with dot 7 added:

   #Hex    Dots       Dec Char Description
   \XB4 (  3   7 )  # 180   ´  acute accent
   \XB8 (     67 )  # 184   ¸  cedilla
   \XA8 (    5 7 )  # 168   ¨  diaeresis

# The two gender symbols are:

   #Hex    Dots       Dec Char Description
   \XBA (      7 )  # 186   º  masculine ordinal indicator
   \XAA (       8)  # 170   ª  feminine ordinal indicator

# The three remaining characters are:

   #Hex    Dots       Dec Char Description
   \XAF ( 2   67 )  # 175   ¯  macron
   \XB5 (    567 )  # 181   µ  micro sign
   \XA0 (      78)  # 160  ~   no-break space

# The nonbreaking space is dots 7 and 8 because this presents a sequence of
# nonbreaking spaces as a smooth low line segment.

   #Hex    Dots       Dec Char Description
   \X7F (   4567 )  # 127  ^?  delete
