Bug 130763 - Strange character counting in Writer
Summary: Strange character counting in Writer
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.0.3 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Word-Count
  Show dependency treegraph
 
Reported: 2020-02-18 21:43 UTC by Dirk Stumpe
Modified: 2023-12-06 09:31 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
screen shot (73.20 KB, image/jpeg)
2020-02-18 21:45 UTC, Dirk Stumpe
Details
odt-file with strange character count (21.66 KB, application/vnd.oasis.opendocument.text)
2020-02-19 21:23 UTC, Dirk Stumpe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Stumpe 2020-02-18 21:43:40 UTC
Description:
In an odt-document from a friend I discovered false character counting. My analysis showed that in a line-feed are 65535 hidden spaces.

During the analysis the attempt to replace double-spaces by single-spaces Writer hung up.

Attached is a modified screen shot of the problem. I asked the author for the permission to upload the file for further analysis.

Steps to Reproduce:
1. Open document
2.
3.

Actual Results:
Open document

Expected Results:
same as before


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.4.0.3 (x64)
Build-ID: b0a288ab3d2d4774cb44b62f04d5d28733ac6df8
CPU-Threads: 4; BS: Windows 10.0 Build 18363; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: threaded
Comment 1 Dirk Stumpe 2020-02-18 21:45:01 UTC
Created attachment 157990 [details]
screen shot
Comment 2 Dieter 2020-02-19 13:47:30 UTC
(In reply to Dirk Stumpe from comment #0)
> During the analysis the attempt to replace double-spaces by single-spaces
> Writer hung up.

I assume, this is a second issue and it is not part of the bug report, right?


Steps to reproduce are not clear to me. I tried the following
1. Open an existing odt-file
2. Select all
3. Open word count from statusbar

Actual result: Character counting between selection and document is different

Are this the correct steps? There are also some bug reports with the same topic. Perhaps your report is related to them. Please see list in https://bugs.documentfoundation.org/showdependencytree.cgi?id=103479&hide_resolved=1
Comment 3 Xisco Faulí 2020-02-19 17:19:58 UTC
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. 
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
(Please note that the attachment will be public, remove any sensitive information before attaching it. 
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)
Comment 4 Dirk Stumpe 2020-02-19 21:23:43 UTC
Created attachment 158014 [details]
odt-file with strange character count

This is the document where the character count error occured. I unpacked it and found in content.xml this entry at the location marked in uploaded JPG: <text:s text:c="65549"/>

The author wanted a linefeed at this position. I don't know what happened, maybe there was some text before. Or the doc was converted to MSW2003, edited and reimported.
Comment 5 Dirk Stumpe 2020-02-19 21:39:53 UTC
(In reply to Dieter from comment #2)
> (In reply to Dirk Stumpe from comment #0)
> > During the analysis the attempt to replace double-spaces by single-spaces
> > Writer hung up.
> 
> I assume, this is a second issue and it is not part of the bug report, right?
> 
> 
> Steps to reproduce are not clear to me. I tried the following
> 1. Open an existing odt-file
> 2. Select all
> 3. Open word count from statusbar
> 
> Actual result: Character counting between selection and document is different
> 
> Are this the correct steps? There are also some bug reports with the same
> topic. Perhaps your report is related to them. Please see list in
> https://bugs.documentfoundation.org/showdependencytree.
> cgi?id=103479&hide_resolved=1

I don't know if this is another issue or the result of the miscounting. Your steps are correct, but this is the first time I detected this problem. Pls see my last comment with the file.
Comment 6 Dieter 2020-02-20 07:56:14 UTC
I confirm ith with

Version: 6.3.4.2 (x64)
Build-ID: 60da17e045e08f1793c57c00ba83cdfce946d0aa
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: threaded

and the document from comment 4. Number of words is the same in selection and document, but number of character differs.

There are also no informations in LO help about character counting.
Comment 7 Dirk Stumpe 2020-02-20 23:18:33 UTC
I don't know much of LO-XML. But I assume that <text:s text:c="2"/> represents two blanks. With this in mind <text:s text:c="65549"/> should show a large white area, but LO doesn't.
Comment 8 QA Administrators 2023-11-24 03:15:45 UTC Comment hidden (obsolete)
Comment 9 Dieter 2023-12-06 09:00:41 UTC
Still present in

Version: 7.6.3.2 (X86_64) / LibreOffice Community
Build ID: 29d686fea9f6705b262d369fede658f824154cc0
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-GB (de_DE); UI: en-GB
Calc: CL threaded

Steps:
1. Open attachment 158014 [details]
2. Status bar shows 300 words and 68.388 characters
3. Strg+a

Expected result
Status bar shows 300 words and 68.388 characters

Actual result
Status bar shows 300 words and 68.374 characters
Comment 10 Dieter 2023-12-06 09:31:33 UTC
I've just recognized, that there is something wrong with the document. After second part of thext there are aroung 65.000 spaces. If you delete them, problem disappears.

So I would say NAB