diff --git a/.gitignore b/.gitignore index d4ba17ab61..25f8f228c6 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,7 @@ /build-aux/ltmain.sh /build-aux/mdate-sh /build-aux/missing +/build-aux/test-driver /build-aux/texinfo.tex # /build-aux/snippet/ @@ -129,6 +130,8 @@ /tests/inpos_compbrl /tests/present_progressive /tests/*.exe +/tests/*.log +/tests/*.trs /tests/TAGS /tests/lastworditalafter /tests/en_gb_g1_italics @@ -145,6 +148,11 @@ /tests/getTable /tests/typeform /tests/pass0_typebuf +/tests/hash_collision +/tests/hyphenate_achena +/tests/hyphenate_alderen +/tests/hyphenate_straightforward +/tests/hyphenate_xxx # /tests/doctests/ /tests/doctests/Makefile diff --git a/NEWS b/NEWS index bcdf09540f..cb1a079f6c 100644 --- a/NEWS +++ b/NEWS @@ -10,7 +10,6 @@ liblouis NEWS -- history of user-visible changes. -*- org -*- number and strings such as 5-inch-diameter and 25-year-old-man should now back-translate correctly. Thanks to John Boyer. - ** Braille Table Improvements - fr-bfu-comp8.utb: corrections, zero was wrongly displayed in some instances. @@ -23,8 +22,18 @@ liblouis NEWS -- history of user-visible changes. -*- org -*- - UEB chardefs - correct title and fixed a long standing bug where dots 46 was inserted between letters (especialy for web addresses). Thanks to Joseph Lee. - - UEB-g1: corrected the at sign dot combination. Thanks to Joseph - Lee. + - Fixed letter sign in en-us and en-ueb tables. Thanks to John + Boyer and Ken Perry. + - UEB Fixes thanks to Mesar Hameed, Ken Perry and Joseph lee: + - Fix problem with at sign. + - Removed section of accented letters, that were left behind from + US table. + - Added todo for accents, to define according to the formal docs. + - Corrected mathematical forall symbol. + - Modified emphasis dot combinations to follow UEB standard. + - Bulgarian bg.ctb: updated to meet modern standards (added latinn letters, + corrected punctuation/mathematical symbols, misc typos). Thanks to Rumiana + Kamenska ** Backwards incompatible changes - Delete the table chardefs-ueb.cti as these rules are now diff --git a/contrib/braille-input.el b/contrib/braille-input.el new file mode 100644 index 0000000000..f2881e434d --- /dev/null +++ b/contrib/braille-input.el @@ -0,0 +1,269 @@ +;; This code is inspired by Vim unicode braille () and http://benizi.com/vim/braille.vim + +(robin-define-package "braille-numerical" + "A simple input method for braille." + + ("b0" ?⠀) + ("b1" ?⠁) + ("b2" ?⠂) + ("b12" ?⠃) + ("b3" ?⠄) + ("b13" ?⠅) + ("b23" ?⠆) + ("b123" ?⠇) + ("b4" ?⠈) + ("b14" ?⠉) + ("b24" ?⠊) + ("b124" ?⠋) + ("b34" ?⠌) + ("b134" ?⠍) + ("b234" ?⠎) + ("b1234" ?⠏) + ("b5" ?⠐) + ("b15" ?⠑) + ("b25" ?⠒) + ("b125" ?⠓) + ("b35" ?⠔) + ("b135" ?⠕) + ("b235" ?⠖) + ("b1235" ?⠗) + ("b45" ?⠘) + ("b145" ?⠙) + ("b245" ?⠚) + ("b1245" ?⠛) + ("b345" ?⠜) + ("b1345" ?⠝) + ("b2345" ?⠞) + ("b12345" ?⠟) + ("b6" ?⠠) + ("b16" ?⠡) + ("b26" ?⠢) + ("b126" ?⠣) + ("b36" ?⠤) + ("b136" ?⠥) + ("b236" ?⠦) + ("b1236" ?⠧) + ("b46" ?⠨) + ("b146" ?⠩) + ("b246" ?⠪) + ("b1246" ?⠫) + ("b346" ?⠬) + ("b1346" ?⠭) + ("b2346" ?⠮) + ("b12346" ?⠯) + ("b56" ?⠰) + ("b156" ?⠱) + ("b256" ?⠲) + ("b1256" ?⠳) + ("b356" ?⠴) + ("b1356" ?⠵) + ("b2356" ?⠶) + ("b12356" ?⠷) + ("b456" ?⠸) + ("b1456" ?⠹) + ("b2456" ?⠺) + ("b12456" ?⠻) + ("b3456" ?⠼) + ("b13456" ?⠽) + ("b23456" ?⠾) + ("b123456" ?⠿) + ("b7" ?⡀) + ("b17" ?⡁) + ("b27" ?⡂) + ("b127" ?⡃) + ("b37" ?⡄) + ("b137" ?⡅) + ("b237" ?⡆) + ("b1237" ?⡇) + ("b47" ?⡈) + ("b147" ?⡉) + ("b247" ?⡊) + ("b1247" ?⡋) + ("b347" ?⡌) + ("b1347" ?⡍) + ("b2347" ?⡎) + ("b12347" ?⡏) + ("b57" ?⡐) + ("b157" ?⡑) + ("b257" ?⡒) + ("b1257" ?⡓) + ("b357" ?⡔) + ("b1357" ?⡕) + ("b2357" ?⡖) + ("b12357" ?⡗) + ("b457" ?⡘) + ("b1457" ?⡙) + ("b2457" ?⡚) + ("b12457" ?⡛) + ("b3457" ?⡜) + ("b13457" ?⡝) + ("b23457" ?⡞) + ("b123457" ?⡟) + ("b67" ?⡠) + ("b167" ?⡡) + ("b267" ?⡢) + ("b1267" ?⡣) + ("b367" ?⡤) + ("b1367" ?⡥) + ("b2367" ?⡦) + ("b12367" ?⡧) + ("b467" ?⡨) + ("b1467" ?⡩) + ("b2467" ?⡪) + ("b12467" ?⡫) + ("b3467" ?⡬) + ("b13467" ?⡭) + ("b23467" ?⡮) + ("b123467" ?⡯) + ("b567" ?⡰) + ("b1567" ?⡱) + ("b2567" ?⡲) + ("b12567" ?⡳) + ("b3567" ?⡴) + ("b13567" ?⡵) + ("b23567" ?⡶) + ("b123567" ?⡷) + ("b4567" ?⡸) + ("b14567" ?⡹) + ("b24567" ?⡺) + ("b124567" ?⡻) + ("b34567" ?⡼) + ("b134567" ?⡽) + ("b234567" ?⡾) + ("b1234567" ?⡿) + ("b8" ?⢀) + ("b18" ?⢁) + ("b28" ?⢂) + ("b128" ?⢃) + ("b38" ?⢄) + ("b138" ?⢅) + ("b238" ?⢆) + ("b1238" ?⢇) + ("b48" ?⢈) + ("b148" ?⢉) + ("b248" ?⢊) + ("b1248" ?⢋) + ("b348" ?⢌) + ("b1348" ?⢍) + ("b2348" ?⢎) + ("b12348" ?⢏) + ("b58" ?⢐) + ("b158" ?⢑) + ("b258" ?⢒) + ("b1258" ?⢓) + ("b358" ?⢔) + ("b1358" ?⢕) + ("b2358" ?⢖) + ("b12358" ?⢗) + ("b458" ?⢘) + ("b1458" ?⢙) + ("b2458" ?⢚) + ("b12458" ?⢛) + ("b3458" ?⢜) + ("b13458" ?⢝) + ("b23458" ?⢞) + ("b123458" ?⢟) + ("b68" ?⢠) + ("b168" ?⢡) + ("b268" ?⢢) + ("b1268" ?⢣) + ("b368" ?⢤) + ("b1368" ?⢥) + ("b2368" ?⢦) + ("b12368" ?⢧) + ("b468" ?⢨) + ("b1468" ?⢩) + ("b2468" ?⢪) + ("b12468" ?⢫) + ("b3468" ?⢬) + ("b13468" ?⢭) + ("b23468" ?⢮) + ("b123468" ?⢯) + ("b568" ?⢰) + ("b1568" ?⢱) + ("b2568" ?⢲) + ("b12568" ?⢳) + ("b3568" ?⢴) + ("b13568" ?⢵) + ("b23568" ?⢶) + ("b123568" ?⢷) + ("b4568" ?⢸) + ("b14568" ?⢹) + ("b24568" ?⢺) + ("b124568" ?⢻) + ("b34568" ?⢼) + ("b134568" ?⢽) + ("b234568" ?⢾) + ("b1234568" ?⢿) + ("b78" ?⣀) + ("b178" ?⣁) + ("b278" ?⣂) + ("b1278" ?⣃) + ("b378" ?⣄) + ("b1378" ?⣅) + ("b2378" ?⣆) + ("b12378" ?⣇) + ("b478" ?⣈) + ("b1478" ?⣉) + ("b2478" ?⣊) + ("b12478" ?⣋) + ("b3478" ?⣌) + ("b13478" ?⣍) + ("b23478" ?⣎) + ("b123478" ?⣏) + ("b578" ?⣐) + ("b1578" ?⣑) + ("b2578" ?⣒) + ("b12578" ?⣓) + ("b3578" ?⣔) + ("b13578" ?⣕) + ("b23578" ?⣖) + ("b123578" ?⣗) + ("b4578" ?⣘) + ("b14578" ?⣙) + ("b24578" ?⣚) + ("b124578" ?⣛) + ("b34578" ?⣜) + ("b134578" ?⣝) + ("b234578" ?⣞) + ("b1234578" ?⣟) + ("b678" ?⣠) + ("b1678" ?⣡) + ("b2678" ?⣢) + ("b12678" ?⣣) + ("b3678" ?⣤) + ("b13678" ?⣥) + ("b23678" ?⣦) + ("b123678" ?⣧) + ("b4678" ?⣨) + ("b14678" ?⣩) + ("b24678" ?⣪) + ("b124678" ?⣫) + ("b34678" ?⣬) + ("b134678" ?⣭) + ("b234678" ?⣮) + ("b1234678" ?⣯) + ("b5678" ?⣰) + ("b15678" ?⣱) + ("b25678" ?⣲) + ("b125678" ?⣳) + ("b35678" ?⣴) + ("b135678" ?⣵) + ("b235678" ?⣶) + ("b1235678" ?⣷) + ("b45678" ?⣸) + ("b145678" ?⣹) + ("b245678" ?⣺) + ("b1245678" ?⣻) + ("b345678" ?⣼) + ("b1345678" ?⣽) + ("b2345678" ?⣾) + ("b12345678" ?⣿)) + +(register-input-method + "braille-numerical" + "braille" + 'robin-use-package + "braille" + "A simple numerical braille input method") + diff --git a/liblouis/lou_translateString.c b/liblouis/lou_translateString.c index 147fc823eb..1805612fbe 100644 --- a/liblouis/lou_translateString.c +++ b/liblouis/lou_translateString.c @@ -677,17 +677,8 @@ validMatch () TranslationTableCharacterAttributes prevAttr = 0; int k; int kk = 0; - unsigned short mask = EMPHASIS | capsemph; if (!transCharslen) return 0; - switch (transOpcode) - { - case CTO_Syllable: - mask |= SYLLABLEMARKS; - break; - default: - break; - } for (k = src; k < src + transCharslen; k++) { if (currentInput[k] == ENDSEGMENT) @@ -704,7 +695,7 @@ validMatch () if ((currentInputChar->lowercase != ruleChar->lowercase)) return 0; if (typebuf != NULL && (typebuf[src] & capsemph) == 0 && - (typebuf[k] & mask) != (typebuf[src] & mask)) + (typebuf[k] | typebuf[src]) != (typebuf[src])) return 0; if (currentInputChar->attributes != CTC_Letter) { @@ -1803,7 +1794,7 @@ markSyllables () if (syllableMarker > 3) syllableMarker = 1; currentMark = syllableMarker << 6; - /*The syllable marker is bita 6 and 7 of typebuf. */ + /*The syllable marker is bits 6 and 7 of typebuf. */ if ((src + transCharslen) > srcmax) return 0; for (k = 0; k < transCharslen; k++) diff --git a/tables/bg.ctb b/tables/bg.ctb index 714ecf9d9c..a8f79d5026 100644 --- a/tables/bg.ctb +++ b/tables/bg.ctb @@ -24,22 +24,66 @@ # braille writing « L'ÉCRITURE BRAILLE DANS LE MONDE », by Sir Clutha # MACKENZIE: http://unesdoc.unesco.org/images/0013/001352/135251fo.pdf # The document is dated 1954, so this table may be quite outdated. - +# Edited on Mar 10 2013 by Rumiana Kamenska +# to meet modern standards. +# Added latinn letters. +# # generated by ttbtest + +#Punctuation and symbols space \s 0 SPACE +space \t 9 tab +space \s 0 blank +space \x00a0 a unbreakable space +sign \x000a 78 newline +space \x000d 0 carriage return punctuation ! 235 EXCLAMATION MARK -punctuation " 2356 QUOTATION MARK +punctuation " 236 QUOTATION MARK punctuation ' 3 APOSTROPHE -punctuation ( 236 LEFT PARENTHESIS -punctuation ) 356 RIGHT PARENTHESIS +punctuation ( 126 LEFT PARENTHESIS +punctuation ) 345 RIGHT PARENTHESIS punctuation , 2 COMMA punctuation - 36 HYPHEN-MINUS punctuation . 256 FULL STOP -include digits8Dots.uti punctuation : 25 COLON punctuation ; 23 SEMICOLON punctuation ? 26 QUESTION MARK punctuation \x00a0 0 NO-BREAK SPACE +sign _ 456 +math < 246 +math = 2345 +math > 135 +sign % 356 +math + 235 +math ~ 346 +sign ` 4 +sign & 12346 +sign $ 1246 +punctuation { 246 +punctuation [ 1235678 +punctuation } 135 +punctuation ] 2345678 +sign ^ 34 +sign @ 2346 +sign # 346 +sign \\ 16 +sign | 1456 +math / 34 +sign * 35 + +# Digits +digit 0 3568 DIGIT ZERO +digit 1 28 DIGIT ONE +digit 2 238 DIGIT TWO +digit 3 258 DIGIT THREE +digit 4 2568 DIGIT FOUR +digit 5 268 DIGIT FIVE +digit 6 2358 DIGIT SIX +digit 7 23568 DIGIT SEVEN +digit 8 2368 DIGIT EIGHT +digit 9 358 DIGIT NINE + +#Cyrillic letters uppercase \x0401 167 CYRILLIC CAPITAL LETTER IO uppercase \x0410 17 CYRILLIC CAPITAL LETTER A uppercase \x0411 127 CYRILLIC CAPITAL LETTER BE @@ -50,7 +94,7 @@ uppercase \x0415 157 CYRILLIC CAPITAL LETTER IE uppercase \x0416 2457 CYRILLIC CAPITAL LETTER ZHE uppercase \x0417 13567 CYRILLIC CAPITAL LETTER ZE uppercase \x0418 247 CYRILLIC CAPITAL LETTER I -uppercase \x0419 123467 CYRILLIC CAPITAL LETTER SHORT I +uppercase \x0419 134567 CYRILLIC CAPITAL LETTER SHORT I uppercase \x041a 137 CYRILLIC CAPITAL LETTER KA uppercase \x041b 1237 CYRILLIC CAPITAL LETTER EL uppercase \x041c 1347 CYRILLIC CAPITAL LETTER EM @@ -82,7 +126,7 @@ lowercase \x0435 15 CYRILLIC SMALL LETTER IE lowercase \x0436 245 CYRILLIC SMALL LETTER ZHE lowercase \x0437 1356 CYRILLIC SMALL LETTER ZE lowercase \x0438 24 CYRILLIC SMALL LETTER I -lowercase \x0439 12346 CYRILLIC SMALL LETTER SHORT I +lowercase \x0439 13456 CYRILLIC SMALL LETTER SHORT I lowercase \x043a 13 CYRILLIC SMALL LETTER KA lowercase \x043b 123 CYRILLIC SMALL LETTER EL lowercase \x043c 134 CYRILLIC SMALL LETTER EM @@ -110,3 +154,31 @@ uppercase \x0462 3457 CYRILLIC CAPITAL LETTER YAT lowercase \x0463 345 CYRILLIC SMALL LETTER YAT uppercase \x046a 2467 CYRILLIC CAPITAL LETTER BIG YUS lowercase \x046b 246 CYRILLIC SMALL LETTER BIG YUS + +# Latin letters +uplow Aa 178,18 +uplow Bb 1278,128 +uplow Cc 1478,148 +uplow Dd 14578,1458 +uplow Ee 1578,158 +uplow Ff 12478,1248 +uplow Gg 124578,12458 +uplow Hh 12578,1258 +uplow Ii 2478,248 +uplow Jj 24578,2458 +uplow Kk 1378,138 +uplow Ll 12378,1238 +uplow Mm 13478,1348 +uplow Nn 134578,13458 +uplow Oo 13578,1358 +uplow Pp 123478,12348 +uplow Qq 1234578,123458 +uplow Rr 123578,12358 +uplow Ss 23478,2348 +uplow Tt 234578,23458 +uplow Uu 13678,1368 +uplow Vv 123678,12368 +uplow Ww 245678,24568 +uplow Xx 134678,13468 +uplow Yy 1345678,134568 +uplow Zz 135678,13568 diff --git a/tables/en-us-g2.ctb b/tables/en-us-g2.ctb index d7bb271096..397371eb37 100644 --- a/tables/en-us-g2.ctb +++ b/tables/en-us-g2.ctb @@ -808,6 +808,7 @@ begword hecto 125-15-14-2345-135 10^2 begword deca 145-15-14-1 10^1 begword deci 145-15-14-24 10^-1 begword centi 14-26-2345-24 10^-2 +begword gastro 1245-1-34-1235-135 begword milli 134-24-123-123-24 10^-3 begword micro 134-24-14-1235-135 10^-6 begword nano 1345-1-1345-135 10^-9