I sometimes need to insert a word joiner character (Unicode 0x2060) between two words or characters to ensure they stay on the same line. However, there seems to be a bug in Aspose (I think) whereby the word joiner will look like a space in the final document. In fact, I’m not sure if this is a bug in Aspose or an oddity of Word, because the character still seems to be a word joiner in Word. Here’s how to test it, though:
- Download and unzip the attached file to extract word-joiner-bug.rtf. Open the file in an RTF editor. You will see that it starts with the following text:
This is the Abstract
After this is a superscript “1”. Between “Abstract” and the superscript “1” is a word-joiner character. You can see this by moving the cursor using the arrow keys through the text - you’ll see it gets stuck a character before the “1”, where the invisible word-joiner is.
Open word-joiner-bug.rtf in Word (I’m using Office 365 for Mac, Word 16.10). Note that everything looks as expected - the word-joiner is invisible.
Use File > Save As and save the document as a .docx file. Then close and reopen the file. You’ll see the word-joiner is still invisible.
Now use Aspose.Words to convert word-joiner-bug.rtf file to .docx, and open the converted .docx file in Word.
At this point you will see that it looks as though there is a space between “Aspose” and the “1”. The word-joiner character is as wide as a space for some reason.
Strangely, if I Save As from Word to save the converted .docx file back to RTF, then close and reopen the file, the space is gone. So I’m not sure if this is Word or Aspose’s problem, but saving the .docx file from Word doesn’t have the problem - the problem only occurs when converting using Aspose.
I hope that makes sense.
word-joiner-bug.rtf.zip (1.2 KB)