-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Surrogate characters are decoded wrongly in makeJustificationArray #605
Comments
Hi @EmanuelCozariz, You're right, the justification code was not surrogate pair aware. I have made the fix but have not added a test as fonts with surrogate pair coverage tend to be too large to add to the repository. Hopefully, time permitting, you could download the repository and test with your use case before the next release, which should be soon? Anyway, thanks again for reporting and debugging this issue. |
I think this is fixed. Please feel free to re-open if required. Release soon. |
Do you have a release timeline? We are blocked by this issue at the moment. Thank you. |
Hopefully on the weekend (Sunday 29 Nov) if no blocking issues come up. |
Given the following string 𧙗, this will be encoded as '\uD85D\uDE57'
The above string will be accepted by the font CODE2002.ttf
But it is incorrectly decoded.
Method makeJustificationArray of PdfBoxFastOutputDevice
uses Character.toString(c) to add to the data array
uD85D => Character.toString(c) will decode as �
uDE57 => Character.toString(c) will decode as �
The text was updated successfully, but these errors were encountered: