Bug 136376 - RTL lines of text containing zero width non-joiner are displayed as boxes, on Mac
Summary: RTL lines of text containing zero width non-joiner are displayed as boxes, on...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.5.2 release
Hardware: All macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-01 16:26 UTC by Lars
Modified: 2021-02-12 20:18 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
test document with ZWNJ characters in Persian text (11.74 KB, application/vnd.oasis.opendocument.text)
2020-09-01 16:59 UTC, Lars
Details
screenshot: test document displayed in LibreOffice (43.10 KB, image/png)
2020-09-01 17:02 UTC, Lars
Details
screenshot: test document displayed in MS Word (55.50 KB, image/png)
2020-09-01 17:07 UTC, Lars
Details
test document with ZWNJ characters in Persian text (13.77 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-09-01 17:09 UTC, Lars
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars 2020-09-01 16:26:33 UTC
Description:
In Persian text, when a zero width non-joiner character (ZWNJ, Unicode U+200C) is present, most or all of that line of text is displayed as boxes instead of the correct characters.

In Persian, the ZWNJ is important for correct writing of the language. (See https://en.wikipedia.org/wiki/Zero-width_non-joiner, http://zwnj.behnam.es/2014/02/microsoft-and-persian-keyboard-layouts.html)

Here is some text without ZWNJ:



Here it is 
Not with Auflage


Steps to Reproduce:
1. Enter some Persian text without ZWNJ, e.g. copy and paste دست
2. After the above text, on the same line, type a space, then copy and paste some text containing ZWNJ, e.g. دست‌ها

Actual Results:
Before entering text with ZWNJ, characters are displayed correctly. After entering text with ZWNJ, all of the characters on the line are displayed as boxes (empty rectangles).

Sometimes it's only most of the characters on the line; and sometimes certain characters disappear completely, apparently depending on what text is on the line.

Expected Results:
The text should all be displayed as Persian characters, e.g. دست دست‌ها


Reproducible: Always


User Profile Reset: Yes



Additional Info:
I will attach examples after the bug is filed.

To check whether this problem was specific to RTL scripts, I tried using a ZWNJ in LTR text, such as "deaf‌ly" and "Auf‌lage". The problem did not occur in LTR tests.

I also tried Windows 10 vs. Mac. I only see the problem on Mac. (MacOS 10.14.6 (18G5033))

In addition, I tested both the 6.3.5.2 release and the new 7.0.0.3 build. The bug is present in both.

Version: 7.0.0.3
Build ID: 8061b3e9204bef6b321a21033174034a5e2ea88e
CPU threads: 8; OS: Mac OS X 10.14.6; UI render: default; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 Lars 2020-09-01 16:30:42 UTC
Sorry, I didn't notice that I left the Description field half-unfinished. I don't see a way to fix it now. The last couple of paragraphs were supposed to say:

Here is some text without ZWNJ: دست

Here is text with ZWNJ: دست‌ها
Comment 2 Lars 2020-09-01 16:59:47 UTC
Created attachment 164980 [details]
test document with ZWNJ characters in Persian text

This LibreOffice Writer doc contains Persian text with ZWNJ characters in it, demonstrating the problem.
Comment 3 Lars 2020-09-01 17:02:09 UTC
Created attachment 164981 [details]
screenshot: test document displayed in LibreOffice

A screenshot showing how the test document displays in LO Writer on my Mac.
Comment 4 Lars 2020-09-01 17:07:08 UTC
Created attachment 164982 [details]
screenshot: test document displayed in MS Word
Comment 5 Lars 2020-09-01 17:09:18 UTC
Created attachment 164983 [details]
test document with ZWNJ characters in Persian text

This document contains Persian text with ZWNJ characters, demonstrating the problem.
Comment 6 eisa01 2021-01-23 21:06:26 UTC
I tried your text document, but LibreOffice renders it just fine

Can you try in the current LO 7.1 release candidate?
https://www.libreoffice.org/download/download/?version=7.1.0

Version: 7.1.0.2 / LibreOffice Community
Build ID: 53d68d29d90fd16448721a60aad68c28ff0809f5
CPU threads: 4; OS: Mac OS X 10.14.6; UI render: default; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 7 Lars 2021-02-09 22:46:23 UTC
(In reply to eisa01 from comment #6)
> I tried your text document, but LibreOffice renders it just fine
> 
> Can you try in the current LO 7.1 release candidate?
> https://www.libreoffice.org/download/download/?version=7.1.0
> 
> Version: 7.1.0.2 / LibreOffice Community
> Build ID: 53d68d29d90fd16448721a60aad68c28ff0809f5
> CPU threads: 4; OS: Mac OS X 10.14.6; UI render: default; VCL: osx
> Locale: en-US (en_US.UTF-8); UI: en-US
> Calc: threaded

Thanks for looking into this. What version of LO did you use that rendered the document fine?


I tried it with LO 7.1.0.3.
The text containing ZWNJ characters no longer displays as boxes. So it looks like that problem is solved.

There were some other serious display issues that would prevent me from using this version of LO, but hopefully those will be sorted out before the stable release.
Comment 8 Lars 2021-02-09 22:48:38 UTC
I set the status to UNCONFIRMED following some instructions on the screen. I'm not sure if I'm supposed to set it to RESOLVED, since LO 7.1.0.3 doesn't appear to have the same problem?
Comment 9 eisa01 2021-02-12 20:18:56 UTC
Hi Lars,
thanks for getting back!

I used 7.1.0.2

As it's also fixed for you, we can set it as Resolved - Works for me
For the other issues, you can file new bugs. 7.1.0.3 that you tested is the final 7.1.0 release (last digit denotes the release candidate version)