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
_______________________________________________
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: [email protected]
For general information, go to: http://brltty.app/mailman/listinfo/brltty

Reply via email to