Number followed by neutral character (dot) in RTL text (arabic) doesn't keep the correct prosition

The text “سيب 321. شسي” is not rendered correctly in a Word generated using Aspose.Words.
The generated texts is "سيب 321. شسي
". The problem is with the .(dot) character. It should be on the left of the number, not on the right.

The code to reproduce the issue is:

var doc1 = new Document();

var paragraph = new Paragraph(doc1);
paragraph.ParagraphFormat.Bidi = true;
var run = new Run(doc1) {Text = "سيب 321. شسي"};
paragraph.Runs.Add(run);
doc1.FirstSection.Body.AppendChild(paragraph);
doc1.Save(@"C:\Document.docx", SaveFormat.Docx);

Regards,
Lucian Nistor
Senior .Net Developer
IBM Romania

Hi Lucian,

Thanks for your inquiry. Perhaps, you are using an older version of Aspose.Words; as with Aspose.Words v13.7.0, I am unable to reproduce this problem on my side. I would suggest you please upgrade to the latest version of Aspose.Words i.e. v13.7.0 and let us know how it goes on your side. I hope, this will help. I have attached the output Docx file with this post for your kind reference.

If you still face problem, please provide information about your specific culture, such as the name of the culture, language and country/region. I will investigate the issue on my side and provide you more information.

I’ve tested with Aspose.Words 13.7.0 and it still reproduces. The .(dot) is on the right side of the number.
Also I’ve opened your file and the dot is on the right not on the left side, as it is supposed to be.

I’ve tested on English (Us) and on Hebrew (Israel) settings and in both cultures it behaves the same, the dot is on the right side of the number.

Regards,
Lucian Nistor
Senior .Net Developer
IBM Romania

Hi,

I’ve found out from another post that I also have to set the Font.BiDi property to true in order to get the desired result.

Regards,
Lucian Nistor
Senior .Net Developer
IBM Romania

Hi Lucian,

Thanks for your feedback. It is nice to hear from you that your problem has been solved. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.