[liblouis-liblouisxml] Spaces being erroneously stripped when typeforms specified

Hi all,

A user reported a bug in NVDA which I've tracked down to a bug in lou_translate when translating a string with spaces at the end including typeforms. In this case, the spaces at the end are stripped. This occurs even if the table being used doesn't handle typeforms. In Python: >>> louis.translate(["louis/tables/en-us-comp8.ctb"], u"ab ", typeform=(0, 0, 0, 0), mode=louis.dotsIO, cursorPos=0)
(u'\u8001\u8003\u8000\u8000', [0, 1, 2, 3], [0, 1, 2, 3], 0)
>>> louis.translate(["louis/tables/en-us-comp8.ctb"], u"ab ", typeform=(0, 4, 4, 0), mode=louis.dotsIO, cursorPos=0)
(u'\u8001\u8003', [0, 1], [0, 1, 2, 3], 0)
(Typeform 4 is bold.)
Unless I'm missing something, the result of these two commands should have been the same. Can anyone give me some idea of what might be happening here? I'm not even sure where to start. :)


James Teh
Director, NV Access Limited
Email: jamie@xxxxxxxxxxxx
Web site: http://www.nvaccess.org/
Phone: +61 7 5667 8372
For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

Other related posts: