AsciidocFX icon indicating copy to clipboard operation
AsciidocFX copied to clipboard

No pdf export possible in 1.7.1 anymore

Open ullenboom opened this issue 6 years ago β€’ 3 comments

I just get a corrupt PDF, 15 bytes. A XML file is getting created and removed.

ullenboom avatar Aug 06 '19 15:08 ullenboom

Can you share your file? I can check it.

rahmanusta avatar Aug 06 '19 21:08 rahmanusta

i found the problem, its those unicode characters in my script:

Überlege, wie man selbst eine Abbildung etwa von "tutego" nach "πŸ…£πŸ…€πŸ…£πŸ…”πŸ…–πŸ…ž" hinbekommt.

ullenboom avatar Aug 07 '19 07:08 ullenboom

Bug analysis.

The problem is that AsciidocFX converts, when converting from the AsciiDoc format to the DocBook format, characters which are not in the Unicode basic multilingual plane (characters whose Unicode code point values are 65536 or higher) wrongly. For example, it converts "πŸ”ˆ" into ��, while it should have converted "πŸ”ˆ" into 🔈.

The underlying bug is the assumption that there is a 1-to-1 mapping of UTF-16 values to XML character entity references, which is wrong. Specifically, the bug fails to handle so-called UTF-16 surrogate pairs (which only applies to Unicode code point values which are 65536 or higher), where 2 UTF-16 values represent only 1 Unicode code point.

felixvf avatar Jan 03 '20 17:01 felixvf