You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Ethan Gruber <ew...@gmail.com> on 2022/11/18 16:15:33 UTC
Java string error with certain ranges of right-to-left Unicode characters
Hi all,
I am attempting to generate a PDF that contains characters from the
Kharoshthi Unicode set (https://en.wikipedia.org/wiki/Kharosthi).
I have downloaded the newest version of FOP and still get the same errors I
tested on earlier versions built into Oxygen XML editor.
The error starts with (I attach a full error in a text file):
java.lang.StringIndexOutOfBoundsException: index 1,length 1
at java.base/java.lang.String.checkIndex(String.java:3278)
at java.base/java.lang.StringUTF16.checkIndex(StringUTF16.java:1470)
at java.base/java.lang.StringUTF16.charAt(StringUTF16.java:1267)
at java.base/java.lang.String.charAt(String.java:695)
After doing some more testing to narrow down the error, this seems to occur
in Unicode blocks with 5 characters rather than the typical four, for
example 𐨐 (Kharoshthi letter Ka), but only in right-to-left
scripts. I also tested the right-to-left 5-character Meroitic and received
the same error. But I tested the 5-character left-to-right Linear A and
Gothic, which successfully passed. Lower right-to-left Unicode blocks for
Arabic and Hebrew also passed.
I have also included an FO XML file, for reference. I appreciate any
feedback.
Thanks,
Ethan