[BRLTTY] Low-level BrlAPI questions

Samuel Thibault samuel.thibault at ens-lyon.org
Thu Apr 15 11:07:14 EDT 2021


Dave Mielke, le jeu. 15 avril 2021 06:40:03 -0400, a ecrit:
> [quoted lines by Samuel Thibault on 2021/04/15 at 12:24 +0200]
> 
> >> But this function cannot be called safely from languages that are Unicode
> >> only.
> >
> >As mentioned previously, we can add a brlapi_writeUtf8Text, just like we
> >already have brlapi_writeWText
> 
> If my understanding is correct, an unassigned text size means to call strlen().

Text size is in bytes, not characters. That is why strlen() is fine
there. Number of characters however has to be equal to regionSize,
and in the utf-8 case we can also compute it. Put another way:
brlapi___writeText (the internal version, not brlapi__writeText) would
need to have an additional parameter to tell that this is utf-8 and thus
use utf-8 encoding rather than assuming 1-byte encoding.

Samuel


More information about the BRLTTY mailing list