ASCII brackets (e.g. (), [] etc) are reversed when the paragraph is RTL
Steps to Reproduce:
- Download the pdf in https://bugs.documentfoundation.org/attachment.cgi?id=182980.
- Run the following script:
$ pdftotext sdext/source/pdfimport/test/testdocs/tdf104597_textrun.pdf /tmp/output.txt
$ cat /tmp/output.txt
Current Result:
... )ABC) DEF ] ...
Expected Result:
... (ABC) DEF [ ...
This issue was initially reported in the LibreOffice bugzilla: https://bugs.documentfoundation.org/show_bug.cgi?id=151473