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
Zero Width Space in input text crashes the program #552
Comments
Thank you very much! For me: here is a layout that crashes <Layout xmlns="urn:speedata.de:2009/publisher/en"
xmlns:sd="urn:speedata:2009/publisher/functions/en">
<Record element="data">
<PlaceObject>
<Textblock>
<Paragraph>
<Value>​ text</Value>
</Paragraph>
</Textblock>
</PlaceObject>
</Record>
</Layout> (4.15.19, sp --dummy) |
@LdBeth I am not sure that I am able to fix the error without more help from you.
I have a fix for a problem I have constructed above, but I am not sure (different error message) that this will also fix your error. |
No, it is a different issue from the problem here but It seems harfbuzz mode cannot be use together with font fallback. While in the layout file I used when I discover this issue I relied on font fallback to handle English text mixed with Japanese.
Actually, the problem cannot be reproduced with harfbuzz mode on.
and data.xml
Also the font file seems unrelated to the problem so you can replace them with the files available on your system. |
I cannot reproduce the program crash with this example on 4.15.19, however I found the issue to be using
|
Also I would like to confirm an unexpected behavior, when the file directory is like
The file |
... thank you very much, I can reproduce the problem and I will provide a fix. |
... It would help me organzing stuff if this is opened in a different issue. That said, this is "expected", although not well documented: https://doc.speedata.de/publisher/en/basics/fileorganization/#ch-fileorganization dupicate entries should give a better warning. |
Minimal layout: <Layout
xmlns="urn:speedata.de:2009/publisher/en"
xmlns:sd="urn:speedata:2009/publisher/functions/en">
<Record element="data">
<PlaceObject>
<Textblock>
<Paragraph>
<Value select="title" />
</Paragraph>
</Textblock>
</PlaceObject>
</Record>
</Layout> data: <data>
<title>a​ b</title>
</data> |
Yes, I can confirm the minimal layout reproduces the same problem I have. |
A workaround (until I provide a fix) is to say
|
This should be fixed in version 4.15.20 (now online). Thank you very much for your bug report and your patience! |
Zero width space (ZWSP)
​
or​
, either occurs as UTF-8 character or as XML entity in the input, would crash Speedata when ran with default flags, leaving a cryptic error message:This is tested with 4.14.0 release and also developer version 4.15.19 on Intel based macOS.
I noticed the Speedata manual listed
​
as one of the space characters interpreted, and seems other unicode space characters does not cause the problem, so this is likely a bug.The text was updated successfully, but these errors were encountered: