liblouis 3.40.0 has been released

The liblouis developer team is proud to announce the liblouis release
3.40.0. The release is available for download at:

https://github.com/liblouis/liblouis/releases

Introduction
============

Liblouis is an open-source braille translator and back-translator. It
features support for computer, literary and math braille, supports
contracted and uncontracted translation for many, many languages [1]_.
It plays an important role in an open source accessibility stack and is
used by screenreaders such as NVDA, Orca and JAWS. A companion project
liblouisutdml [2]_ deals with formatting of braille.

Noteworthy changes in this release
==================================

With 47 merged pull requests, about twice as many as usual, this is an
unusually busy release. It brings new tables for Kyrgyz and for
Ukrainian with European letters, an update of the Spanish grade 0, 1 and
2 tables to the current standards of the Comisión Braille Española
together with new Spanish tables for chess, mathematics and chemistry,
and entry tables for Galician and Basque. The Biblical Hebrew tables
handle several more text conventions, and back-translation of UEB
capitals and of capitals passages works much better. A number of memory
safety issues were fixed, and the table compiler now rejects some
malformed rules it used to accept silently.

This is also the first release of the transition to louis-rs, see below.

Thanks to Anthony, Leonard, Danil Kostenkov, Sergiy Moskalets, Seeing
Hands, Urh Strakl, Lars, Attila Hammer, Quin Gillespie, Ammar Rahhal,
guiador, ultraleetj, paoscripts and everybody else who contributed, and
as always to Bert.

For a detailed list of all the changes refer to the list of closed
issues [3]_.

Transition to louis-rs
----------------------

louis-rs [4]_, a reimplementation of liblouis in Rust, is nearing
feature parity with liblouis. It uses the same braille tables, so table
authors and braille readers will see no change. From now on liblouis
will be in maintenance mode: it will get four more regular releases, the
last one planned for November 2027, after which only louis-rs will be
maintained. Table changes and fixes for serious bugs will be handled as
before during this transition period. liblouis and louis-rs must stay in
step: new features and behavior changes go into liblouis only once they
are also accepted in louis-rs. See ``CONTRIBUTING.md`` for details.
Application developers: please try louis-rs now and tell us what you
need to switch.

Bug fixes
---------

- Fix back-translation of multind rules with multi-cell indicators, so
  that UEB words like ``AB`` or ``LLC`` written with ⠰⠠⠠ come back in
  capitals, thanks to Anthony Tibbs.
- Back-translate capitals passages (``begcapsphrase`` and
  ``endcapsphrase``), thanks to Anthony Tibbs.
- When the indicators of a multind rule don't fit the cells it matched,
  the other rules for those cells are tried instead of swallowing the
  cell, thanks to Anthony Tibbs.
- A ``context`` rule that consumes nothing no longer fills the output
  buffer in back-translation, thanks to Anthony Tibbs.
- Fix several memory safety issues:

  - out-of-bounds reads from malformed ``swap`` rule offsets, thanks to
    PGZXB;
  - a buffer overflow in ``listDir`` for long directory names on
    ``LOUIS_TABLEPATH``, thanks to Fengxiaoxx;
  - a cursor remapping error and input over-read in ``compbrlAtCursor``
    mode, thanks to Bhav-ya-H;
  - buffer overflows in ``lou_checkyaml`` with long table queries,
    thanks to Anthony Tibbs;
  - a stack overflow when compiling deeply nested ``include``
    statements, thanks to Anthony Tibbs;
  - memory and file handle leaks when table metadata is rejected, thanks
    to Anthony Tibbs.

Braille table improvements
--------------------------

- Add a Kyrgyz uncontracted table, thanks to Seeing Hands. The Cyrillic
  letter definitions it shares with other tables are in
  ``cyrillicLetterDef6Dots.uti`` and
  ``cyrillicTableLatinCompatibility.uti``.
- Add ``uk-eu.utb``, an uncontracted Ukrainian table that also covers
  the letters of most European languages, thanks to Sergiy Moskalets.
- Update the Spanish grade 0 and grade 1 tables to the current standards
  of the Comisión Braille Española, thanks to guiador. ``es.tbl`` is
  merged into ``es-g1.ctb``. New tables for chess (``es-chess.utb``),
  8-dot mathematics (``es-math-8dots.utb``) and 8-dot chemistry
  (``es-chem-8dots.utb``), and entry tables for Galician (``gl.tbl``)
  and Basque (``eu.tbl``). The mathematics and chemistry tables need a
  build with 32-bit Unicode.
- Update the Spanish grade 2 table to version 3 of the CBE document B
  16-1, thanks to ultraleetj.
- In Spanish, back-translate dots 235 and 26 at the start of a word as ¡
  and ¿, thanks to Anthony Tibbs, and define the underscore as dot 6,
  thanks to ultraleetj.
- Improvements to the Biblical Hebrew tables, thanks to Leonard de
  Ruijter:

  - etnachta and zaqef qatan move to the end of the word also across
    sheva and hataf patah;
  - a holam written before its mater waw, as in several widely used BHS
    texts, is brailled as holam male;
  - a yod with a vowel of its own is not contracted after hiriq or
    tsere;
  - meteg and rafe before a shin or sin dot no longer leave a stray
    cell.

- The Russian table with indication of capitals now uses a double
  capital sign for consecutive uppercase Latin letters, as for Cyrillic.
  Roman numerals and two-letter vector names retain a single sign. Both
  Russian literary tables back-translate uppercase Latin sequences
  introduced by this double sign. Thanks to Danil Kostenkov.
- Correct the ``صائم``, ``لم يلبث`` and ``أسئلة`` contractions in Arabic
  grade 2 braille, thanks to Ammar Rahhal.
- Line breaks and tabs are blank cells in Slovenian computer braille,
  instead of escape sequences, thanks to Urh Strakl.
- In the English grade 2 and British tables, insert the letter sign
  after a number also before letters that are single-letter words
  (``1a``), thanks to Anthony Tibbs.
- In ``en-us-g2.ctb``, a lone ⠕ back-translates as a lowercase ``o``,
  thanks to Quin Gillespie.
- Keep the apostrophe after a number in the German tables, thanks to
  Anthony Tibbs.
- Typed ``euro`` and three dots are preserved in Polish
  back-translation, thanks to paoscripts.
- Update the Hungarian hyphenation dictionary to the LibreOffice version
  of 2025-12-13, thanks to Attila Hammer and Zsolt Torma, and new
  Hungarian forward and backward exceptions, thanks to Attila Hammer.
- Small fixes to the Norwegian grade 3 and 8-dot tables, thanks to Lars
  Bjørndal.
- The DEL character is forward-only in ``it-it-comp6.utb``, thanks to
  Quin Gillespie.

Other changes
-------------

- The manual is also generated as a single HTML page.
- Corrections and additions to the manual: how tables are located, the
  size of the typeform buffer, the backtick in ``context`` and multipass
  rules, and multipass rules that consume nothing, thanks to Anthony
  Tibbs and Adam Magued.
- The NMAKE build reports the same version as the Autotools build,
  thanks to André Polykanine.
- The table compiler rejects some malformed rules it used to accept
  silently. None of the tables shipped with liblouis are affected:

  - the two operands of a ``swap`` rule must have the same number of
    items, thanks to Dylan Pulver;
  - the search operand of ``swapdd`` must be single cells, thanks to
    Baris Ari;
  - multipass variables only take values from 0 to 255, and ``#N+``
    stops at 255.

Deprecation notice
------------------

- None

Backwards incompatible changes
------------------------------

- ``es.tbl`` is removed, use ``es-g1.ctb`` instead.

Invisible changes
-----------------

- The Welsh and Latvian tables use ``compbrl`` instead of the deprecated
  ``literal`` opcode, so they no longer print warnings when loaded,
  thanks to Toprak.
- The Thai tables name their character classes.
- More UEB tests, and the YAML tests name their display tables.

New, renamed or removed tables
------------------------------

New
~~~

- ``cyrillicLetterDef6Dots.uti``
- ``cyrillicTableLatinCompatibility.uti``
- ``es-chem-8dots.utb``
- ``es-chess.utb``
- ``es-math-8dots.utb``
- ``eu.tbl``
- ``gl.tbl``
- ``ky-g1.utb``
- ``uk-eu.utb``

Renamed
~~~~~~~

- None

Removed
~~~~~~~

- ``es.tbl``

Next release
============

The next release will be published on March 8 2027 so please keep up the
excellent work and keep those improvements coming.

Share and Enjoy!

– Christian Egli, on behalf of the liblouis developers

Footnotes
=========

.. [1]
   https://github.com/liblouis/liblouis/tree/master/tables

.. [2]
   https://github.com/liblouis/liblouisutdml

.. [3]
   https://github.com/liblouis/liblouis/milestone/50?closed=1

.. [4]
   https://github.com/liblouis/louis-rs
