# liblouis: Swedish Grade Uncontracted Braille Table
#
#-name: Svensk 6-punkts fullskrift
#-index-name: Swedish, uncontracted
#-display-name: Swedish uncontracted braille
#
#  Copyright (C) 2022-2023 Insyn Scandinavia AB <david@insyn.se>
#  Copyright (C) 2012 Mesar Hameed <mesar.hameed@gmail.com>
#  Copyright (C) 2004-2008 ViewPlus Technologies, Inc. www.viewplus.com
#  Copyright (C) 2004-2006 JJB Software, Inc. www.jjb-software.com
#
#-copyright: 2004-2006, JJB Software, Inc. <www.jjb-software.com>
#-copyright: 2004-2008, ViewPlus Technologies, Inc. <www.viewplus.com>
#-copyright: 2012, Mesar Hameed <mesar.hameed@gmail.com>
#-copyright: 2022, Insyn Scandinavia AB <david@insyn.se>
#
#  This braille table is a heavily updated version of the former
#  Swedish braille table called Se-Se-G1.utb which was quite outdated and
#  was missing a lot of character definitions as well as incorrectly
#  handling some situations regarding mixing of numbers and letters
#  etc. This version also includes support for Swedish contractions
#  which previously haven't been available in Liblouis.
#  This new braille table is the result of a joint effort between
#  Punktskriftsnämnden (the Swedish Braille Authority) and
#  Insyn Scandinavia AB.
#
#-author: Insyn Scandinavia AB
#-maintainer: Insyn Scandinavia AB <david@insyn.se>
#
#  This braille table is based on the following documentation:
#  Svenska skrivregler för punktskrift (2009):
#    https://www.mtm.se/skrivregler/dtb-bm-l1.html
#  Kortskrift nivå 1 och 2 (1997):
#    https://www.mtm.se/contentassets/08089b067f61495da1b035390d7a120e/kortskrift-niva-1-och-2---1997---nytt-manuskript-2016-09-26_v4.pdf
#  
#  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/>.
#
#-license: LGPLv2.1

#+language: sv
#+type: literary
#+contraction: no
#+grade: 0
#+dots: 6
#+direction: both

# Characters not to backtranslate (must be included for braille input to work)
include braille-patterns.cti

# Character class used for phonetics
attribute Phoneticchars 

# Spaces
noback space \x00a0 0
include spaces.uti

# Punctuation
punctuation ! 235
punctuation " 56
sign ' 5
punctuation ( 236
punctuation ) 356
punctuation , 2
hyphen - 36
noback punctuation ­ 36
punctuation . 3
punctuation : 25
punctuation ; 23
punctuation ? 26
punctuation [ 12356
punctuation ] 23456
punctuation { 6-12356
punctuation } 6-23456
noback punctuation	‐ 36
noback punctuation	‑ 36
punctuation	– 36-36
noback punctuation	‘ 5
noback sign ’ 5
noback punctuation	“ 56
noback punctuation	” 56
noback punctuation	„ 56
noback punctuation	‟ 56
noback punctuation … 3-3-3

# Special signs
sign # 45-3456
sign € 45-15
sign $ 45-234
sign % 1456
sign ‰ 1456-1456
sign & 12346
sign * 35
noback sign ☆ 35
sign _ 45-36
sign @ 45-12356
sign ^ 4
sign \\ 45-34
sign | 456
sign ¢ 45-14
sign £ 45-123
sign ¥ 45-13456
noback sign ○ 12456-1245
sign § 346
sign © 236-14-356
sign ® 236-1235-356
sign ™ 236-2345-134-356
sign ° 12456-1245
noback sign † 45-256

# Math
math + 256
noback math − 36
math / 34
math < 3456-246
math = 2356
math > 3456-135
math ~ 45-25
noback math ¼ 3456-1-34-3456-145
noback math ½ 3456-1-34-3456-12
noback math ¾ 3456-14-34-3456-145
math × 12456-1346
noback math ÷ 1256
math √ 146
noback math 〈 6-236
noback math 〉 6-356
math 〈 6-236
math 〉 6-356
math ∙	12456-3
noback math ¹ 346-3456-1
noback math ² 346-3456-12
noback math ³ 346-3456-14

# Letters
include latinLetterDef6Dots.uti
include digits6Dots.uti
include litdigits6Dots.uti
base uppercase À à
lowercase à 12356
base uppercase Ä ä
lowercase ä 345
base uppercase Å å
lowercase å 16
base uppercase È è
lowercase è 2346
base uppercase É é
lowercase é 123456
base uppercase Ö ö
lowercase ö 246																			x00D6
base uppercase Ü ü
lowercase ü 1256

# Capital and number signs
capsletter 6
begcapsword 6-6
endcapsword 156
lencapsphrase 3
begcapsphrase 6-6-6
endcapsphrase after 156
numsign 3456

# Repetitions
repeated ... 3-3-3
repeated --- 36-36-36
repeated ___ 45-36-45-36-45-36
always \s--\s 36-36
numericnocontchars abcdefghij
midendnumericmodechars .,\x00a0
noback midnum \x00a0 3
nonumsign 156
undefined 3678

# Bullets
noback sign ● 4-123456
noback sign ⁃ 4-123456
noback sign  4-123456
noback sign • 4-123456
noback sign ■ 4-123456
noback sign ◦ 4-123456
noback sign ▪ 45-123456

# Emojis
noback always � 25-356
noback always ☺ 25-356
noback always � 25-1234
noback always ← 246-25
noback always → 25-135
noback always — 36-36

# Characters to ignore
replace \x0192
replace \xe002
replace \xe003
replace \xe00e
replace \xe144
replace \xe197
replace \xe900
replace \xe902
replace \xe904
replace \xe906
replace \xe908
replace \xe90a
replace \xe924
replace \xe925
replace \xe968
replace \xe9e9
replace \xe9ff
replace \xea00
replace \xea01
replace \xea02
replace \xea03
replace \xea04
replace \xea08
replace \xea0b
replace \xea27
replace \xea4d
replace \xea4e
replace \xea50
replace \xea51
replace \xea52
replace \xea53
replace \xea54
replace \xea58
replace \xea98
replace \xeb03
replace \xeb06
replace \xee92
replace \xf108
replace \xf123
replace \xfffd
replace \xf046
replace \xf017
replace \xf015
replace \xf105
replace \xf002
replace \xf00a
replace \xf15d
replace \xf099
replace \xf0d2
replace \xf09a
replace \xf1d8
replace \xf00c
replace \xf058
replace \x200e
replace \x202a
replace \x200f
replace \xD83D

# Diacritic A
base uppercase Æ æ
lowercase æ 4-345
base uppercase Á á
noback lowercase á 12356
base uppercase Ȁ ȁ
noback lowercase ȁ 4-1 346-26-26-1
base uppercase Ǟ ǟ
lowercase ǟ 346-23-1
base uppercase Ǻ ǻ
noback lowercase ǻ 4-1
base uppercase Ǻ ǻ
noback lowercase ǻ 4-1
base uppercase Ḁ ḁ
noback lowercase ḁ 4-1
base uppercase Â â
lowercase â 346-235-1
base uppercase Ấ ấ
noback lowercase ấ 4-1
base uppercase Ầ ầ
noback lowercase ầ 4-1
base uppercase Ẩ ẩ
noback lowercase ẩ 4-1
base uppercase Ã ã
lowercase ã 346-25-1
base uppercase Ǎ ǎ
lowercase ǎ 346-2356-1
base uppercase Ȧ ȧ
lowercase ȧ 346-3-1
base uppercase Ạ ạ
lowercase ạ 236-3-1
base uppercase Ǡ ǡ
noback lowercase ǡ 4-1
base uppercase Ā ā
lowercase ā 346-36-1
base uppercase Ă ă
noback lowercase ă 4-1
base uppercase Ȃ ȃ
noback lowercase ȃ 4-1
base uppercase Ặ ặ
noback lowercase ặ 4-1
base uppercase Ả ả
noback lowercase ả 4-1
noback lowercase ẚ 4-1
base uppercase Ą ą
noback lowercase ą 4-1
# Diacritic B
noback lowercase ᵬ 4-12
base uppercase Ḃ ḃ
lowercase ḃ 346-3-12
base uppercase Ḅ ḅ
lowercase ḅ 126-3-12
base uppercase Ḇ ḇ
noback lowercase ḇ 4-12
base uppercase Ƀ ƀ
noback lowercase ƀ 4-12
base uppercase Ɓ ɓ
noback lowercase ɓ 4-12
noback lowercase ᶀ 4-12
base uppercase Ƃ ƃ
noback lowercase ƃ 4-12
# Diacritic C
base uppercase Ć ć
lowercase ć 346-35-14
base uppercase Ç ç
lowercase ç 126-2-14
base uppercase Ḉ ḉ
noback lowercase ḉ 4-14
base uppercase Ĉ ĉ
lowercase ĉ 346-235-14
base uppercase Č č
lowercase č 146
base uppercase Ċ ċ
lowercase ċ 346-3-14
base uppercase Ȼ ȼ
noback lowercase ȼ 4-14
base uppercase Ꞓ ꞓ
noback lowercase ꞓ 4-14
# Diacritic D
base uppercase Ḑ ḑ
lowercase ḑ 126-2-145
base uppercase Ḓ ḓ
lowercase ḓ 126-235-145
base uppercase Ď ď
lowercase ď 346-2356-145
base uppercase Ḋ ḋ
lowercase ḋ 346-3-145
lowercase ḍ 126-3-145
noback lowercase ḏ 4-145
base uppercase Đ đ
noback lowercase đ 1456
base uppercase Ƌ ƌ
noback lowercase ƌ 4-145
noback lowercase ȡ 4-145
base uppercase Ɖ ɖ
noback lowercase ɖ 4-145
base uppercase ɗ Ɗ
noback lowercase Ɗ 4-145
# Diacritic E
base uppercase Ȅ ȅ
lowercase ȅ 346-26-26-15
base uppercase Ȩ ȩ
lowercase ȩ 126-2-15
base uppercase Ḝ ḝ
noback lowercase ḝ 4-15
base uppercase Ë ë
lowercase ë 346-23-15
base uppercase Ê ê
lowercase ê 346-235-15
base uppercase Ḙ ḙ
lowercase ḙ 126-235-15
base uppercase Ẽ ẽ
lowercase ẽ 346-25-15
base uppercase Ḛ ḛ
lowercase ḛ 126-25-15
base uppercase Ě ě
lowercase ě 346-2356-15
base uppercase Ė ė
lowercase ė 346-3-15
base uppercase Ẹ ẹ
lowercase ẹ 126-3-15
base uppercase Ē ē
lowercase ē 346-36-15
base uppercase Ḗ ḗ
noback lowercase ḗ 4-15
lowercase ḕ 4-15
base uppercase Ĕ ĕ
noback lowercase ĕ 4-15
base uppercase Ȇ ȇ
noback lowercase ȇ 4-15
base uppercase Ę ę
noback lowercase ę 4-15
# Diacritic I
base uppercase Í í
lowercase í 346-35-24
base uppercase Ì ì
lowercase ì 346-26-24
base uppercase Ï ï
noback lowercase ï 34
base uppercase Î î
lowercase î 346-235-24
base uppercase Ī ī
lowercase ī 346-36-24
# Diacritic L
base uppercase Ĺ ĺ
lowercase ĺ 346-35-123
base uppercase Ḷ ḷ
lowercase ḷ 126-3-123
base uppercase Ḹ ḹ
noback lowercase ḹ 4-123
# Diacritic M
base uppercase ṁ ḿ
lowercase ḿ 346-3-134
base uppercase Ṃ ṃ
lowercase ṃ 126-3-134
# Diacritic N
base uppercase Ń ń
lowercase ń 346-35-1345
base uppercase Ǹ ǹ
lowercase ǹ 346-26-1345
base uppercase ņ ń
lowercase ń 126-2-1345
base uppercase Ṋ ṋ
lowercase ṋ 126-235-1345
base uppercase Ñ ñ
lowercase ñ 346-25-1345
base uppercase Ň ň
lowercase ň 346-2356-1345
base uppercase Ṅ ṅ
lowercase ṅ 346-3-1345
base uppercase Ṇ ṇ
lowercase ṇ 126-3-1345
base uppercase Ṉ ṉ
noback lowercase ṉ 4-1345
noback lowercase ȵ 4-1345
base uppercase Ƞ ƞ
noback lowercase ƞ 4-1345
base uppercase Ɲ ɲ
noback lowercase ɲ 4-1345
base uppercase Ŋ ŋ
lowercase ŋ 1246
noback lowercase ɳ 4-1345
# Diacritic O
base uppercase Ó ó
lowercase ó 346-35-135
base uppercase Ò ò
lowercase ò 346-26-135
base uppercase Ô ô
lowercase ô 346-235-135
base uppercase Õ õ
lowercase õ 346-25-135
# Diacritic P
base uppercase Ṕ ṕ
lowercase ṕ 346-35-1234
base uppercase Ṗ ṗ
lowercase ṗ 346-3-1234
base uppercase Ƥ ƥ
noback lowercase ƥ 4-1234
# Diacritic Q
noback lowercase ʠ 4-12345
base uppercase Ɋ ɋ
noback lowercase ɋ 4-12345
# Diacritic R
base uppercase Ŕ ŕ
lowercase ŕ 346-35-1235
base uppercase Ȑ ȑ
lowercase ȑ 346-26-26-1235
base uppercase Ṙ ṙ
lowercase ṙ 346-3-1235
base uppercase Ṛ ṛ
lowercase ṛ 126-3-1235
base uppercase Ṝ ṝ
noback lowercase ṝ 4-1235
base uppercase Ṟ ṟ
noback lowercase ṟ 4-1235
base uppercase Ř ř
noback lowercase ř 4-1235
base uppercase Ȓ ȓ
noback lowercase ȓ 4-1235
noback lowercase ɼ 4-1235
base uppercase Ɽ ɽ
noback lowercase ɽ 4-1235
noback lowercase ɾ 4-1235
# Diacritic S
base uppercase Š š
noback lowercase š 156
# Diacritic T
base uppercase Ţ ţ
lowercase ţ 126-2-2345
lowercase ẗ 346-23-2345
base uppercase Ť ť
lowercase ť 346-2356-2345
base uppercase Ṫ ṫ
lowercase ṫ 346-3-2345
base uppercase Ṭ ṭ
lowercase ṭ 126-3-2345
base uppercase Ț ț
noback lowercase ț 4-2345
base uppercase Ṯ ṯ
noback lowercase ṯ 4-2345
base uppercase Ŧ ŧ
noback lowercase ŧ 1256
base uppercase Ʈ ʈ
noback lowercase ʈ 4-2345
noback lowercase ƫ 4-2345
# Diacritic U
base uppercase Ú ú
lowercase ú 346-35-136
base uppercase Ù ù
lowercase ù 346-26-136
base uppercase Û û
lowercase û 346-235-136
base uppercase Ū ū
lowercase ū 346-36-136
# Diacritic W
base uppercase Ẃ ẃ
lowercase ẃ 346-35-2456
base uppercase Ẁ ẁ
lowercase ẁ 346-26-2456
base uppercase Ẅ ẅ
lowercase ẅ 346-23-2456
# Diacritic Y
base uppercase Ý ý
lowercase ý 346-35-13456
base uppercase Ỳ ỳ
lowercase ỳ 346-26-13456
base uppercase Ÿ ÿ
lowercase ÿ 346-23-13456
# Diacritic Ž
base uppercase Ž ž
lowercase ž 2346 # Sami
# Other diacritic letters
base uppercase Ø ø
noback lowercase ø 4-135
base uppercase Œ œ
noback lowercase œ 4-246
base uppercase ẞ ß
noback lowercase ß 4-234
base uppercase Ð ð
noback lowercase ð 4-145
base uppercase Þ þ
noback lowercase þ 4-2345
# Diacritical marks
sign ´ 45-35
sign ` 45-26
sign ¸ 45-2
noback sign ˆ 45-235
sign ^ 45-235
sign ˇ 45-2356
sign ¨ 45-23
sign ḝ 45
sign ḝ 45

# Phonetics
noback always  256-16
noback sign  1
noback sign  235-1
noback sign  16
noback sign  235-16
noback sign  146
noback sign  346
noback sign  235-12
noback sign  14
noback sign  235-234
noback sign  256-145
noback always  145-2346
noback sign  12456
noback sign  15
noback sign  26
noback sign  345
noback sign  235-345
noback always  256-345
noback sign  1245
noback sign  235-1245
noback sign  125
noback sign  236-125
noback sign  1346-156
noback sign  23456
noback sign  24
noback sign  34
noback sign  13
noback sign  123
noback sign  256-123
noback sign  123456
noback sign  1246
noback sign  256-1345
noback sign  135
noback sign  356-135
noback sign  1456
noback sign  1256
noback sign  246
noback sign  35-246
noback always  256-246
noback sign  126
noback always  256-126
noback sign  1234
noback sign  235-1235
noback sign  3456
noback sign  35-1235
noback sign  234
noback sign  256-234
noback sign  156
noback sign  2345
noback sign  256-2345
noback sign  136
noback sign  356-136
noback sign  12356
noback sign  1236
noback sign  2456
noback sign  1346
noback sign  13456
noback sign  12346
noback sign  235-13456
noback sign  1356
noback sign  2346
noback sign  134
noback sign  25
noback sign  1235
noback sign  45
noback sign  12
noback sign  145
noback sign  26
noback sign  1345
noback sign  124
noback sign  245
noback sign  4
noback punctuation  56-2356
noback punctuation  56-2356
noback context [$w]"" @256* # Swap places for these characters
noback context $w[]"(" @6 # Insert dot 6 before parenthesis
noback context $w[]")" @6 # Insert dot 6 before parenthesis
