Bug 70032 - Non breakable spaces not displayed correctly
Summary: Non breakable spaces not displayed correctly
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: Other Windows (All)
: medium normal
Assignee: Not Assigned
Depends on:
Reported: 2013-10-02 10:37 UTC by bugzilla
Modified: 2015-07-27 11:12 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:
Regression By:

the docx test file (90.38 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2013-10-02 10:37 UTC, bugzilla
missing spaces in LibreOffice (4.32 KB, image/png)
2013-10-02 10:39 UTC, bugzilla
spaces visible in MS Office (3.75 KB, image/png)
2013-10-02 10:39 UTC, bugzilla

Note You need to log in before you can comment on or make changes to this bug.
Description bugzilla 2013-10-02 10:37:47 UTC
Created attachment 86956 [details]
the docx test file

Problem description: A MS Word docx file was opened in LibreOffice. Some non-breakable spaces are not displayed correctly.

Steps to reproduce:
1. Open testdocument.docx in LibreOffice.
2. Open testdocument.docx in MS Office.
3. Show paragraph marks and other hidden formatting signs in both applications.
4. Scroll down to the tables and compare how the spaces between the currency symbol and the amounts look like.
5. See encircled spots in the screenshots.

Current behavior:
In LibreOffice, the non-breakable spaces are insserted but not displayed.

Expected behavior: There should be a space between the currency symbol and the amount.
Comment 1 bugzilla 2013-10-02 10:39:13 UTC
Created attachment 86957 [details]
missing spaces in LibreOffice
Comment 2 bugzilla 2013-10-02 10:39:45 UTC
Created attachment 86958 [details]
spaces visible in MS Office
Comment 3 tommy27 2013-10-03 09:35:28 UTC
issue confirmed in LibO under Win7 64bit. set status to NEW
Comment 4 Simo Kaupinmäki 2014-06-12 13:11:12 UTC
Actually, the character between the currency symbol and the amount seems to be a zero width space (U+200B). That's what it looks like in LibreOffice Writer if you have field shadings on. If you turn field shadings off (View > Field Shadings), zero width spaces become invisible (but they'll allow a line break after the currency symbol, which probably isn't what you want).

I don't have Word available, so I'm guessing here, but the rectangular symbol in Word may be a surrogate symbol indicating that Word doesn't know how to render the character correctly (perhaps because it isn't covered by the font).
Comment 5 QA Administrators 2015-07-18 17:44:21 UTC Comment hidden (spam)
Comment 6 tommy27 2015-07-20 05:08:37 UTC
still present in LibO and (x64)
Build ID: 5a61d7f049a81d6e747d9d097f364ae45f58697b
TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2015-07-16_01:06:26
Locale: en-US (it_IT)
Comment 7 tommy27 2015-07-20 05:11:20 UTC
same issue on LibO 3.3.3 and OOo 3.3.0
so bug is inherited from OOo
Comment 8 Simo Kaupinmäki 2015-07-27 10:04:58 UTC
Well, as I said above, the characters are not no-break spaces (U+00A0) but zero-width spaces (U+200B),  and they are rendered correctly by Libo. (In Word there is a handy way to identify an unknown character: if you position the text cursor right after the character and press Alt-x, the character is immediately replaced by its hexadecimal Unicode value.) 

What is strange is that MS Word shows the zero-width spaces as rectangles, but this seems a bug in Word (though I can't actually reproduce this using Word 2013 on Windows 7). Therefore, I think this one can be closed as NOTOURBUG.

In case there were originally no-break spaces in the document which were then somehow converted into zero-width spaces when edited or resaved with Libo, please file a new bug for this.
Comment 9 Simo Kaupinmäki 2015-07-27 10:15:55 UTC
Oh, of course the zero-width spaces are only displayed as rectangles in Word if the non-printing characters are made visible. Doh.
Comment 10 tommy27 2015-07-27 10:24:17 UTC
so the NOTOURBUG is correct?
Comment 11 Simo Kaupinmäki 2015-07-27 10:52:06 UTC
Yes. There seems to be nothing wrong in the way these characters are displayed in Libo.
Comment 12 Simo Kaupinmäki 2015-07-27 11:12:14 UTC
Also, if the non-printing characters are not made visible, the zero-width spaces are not shown at all even in Word. This is perfectly correct, as the zero-width space is inteded to be invisible (though it allows line breaking). Therefore I think the non-printing rectangles in Word are rather confusing, and Libo's rendering of these characters (though with field shadings on) is better.