Bug 64671

Summary: FILESAVE: Documents containing "Ž" are mangled in RTF format
Product: LibreOffice Reporter: Kamil Páral <kamil.paral>
Component: WriterAssignee: Urmas <davian818>
Status: RESOLVED FIXED    
Severity: normal CC: vmiklos
Priority: medium    
Version: 3.6.6.2 release   
Hardware: Other   
OS: Linux (All)   
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=46633
Whiteboard: BSA target:4.2.0 target:4.1.0.0.beta2 target:4.0.4
Crash report or crash signature: Regression By:
Attachments: example broken file

Description Kamil Páral 2013-05-16 13:38:31 UTC
Created attachment 79418 [details]
example broken file

Problem description: 
"Ž" is a standard Czech character. But if I save text containing this character in RTF format and open the document again, the text is mangled - usually an extra "}" character appears after "Ž".

This problem only affects RTF format. In DOC or ODT everything works fine.

I have verified this problem on two different computers, both running Fedora 18.

libreoffice-writer-3.6.6.2-5.fc18.x86_64

Steps to reproduce:
1. Create an empty document and save it as file.rtf. Close Writer. This step is necessary, not sure why.
2. Open file.rtf and type in Ž. Save and close Writer.
3. Open file.rtf and see that it contains "Ž}" or similar.

Current behavior:
For every "Ž" an extra character is added, sometimes replacing other character. For example "Židenice" can become "Ž}denice".

Expected behavior:
No text mangling

Operating System: Fedora
Version: 3.6.6.2 release
Comment 1 Urmas 2013-05-16 15:00:34 UTC
There are two problems:
The first is Bug 46633
The second is that the character '}' is not skipped correctly with \uc.
Comment 2 Commit Notification 2013-05-27 08:02:30 UTC
Urmas committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=bfb93ffc6d72d22a833acf9d8c9d166153dad7c0

fdo#64671 Some special RTF characters were not skipped correctly



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 3 Commit Notification 2013-05-27 11:51:36 UTC
Urmas committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=25f70433aa0f1c9d98fc92cb2d896e8e887bfb4b&h=libreoffice-4-1

fdo#64671 Some special RTF characters were not skipped correctly


It will be available in LibreOffice 4.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2013-05-27 12:07:31 UTC
Urmas committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6226fcc4166f2a8e3c7f2016d423372e9e4a3d0b&h=libreoffice-4-0

fdo#64671 Some special RTF characters were not skipped correctly


It will be available in LibreOffice 4.0.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 5 Miklos Vajna 2013-05-27 12:08:27 UTC
Fixed in master, -4-1 and -4-0, marking as resolved.
Comment 6 Kamil Páral 2013-05-31 14:58:06 UTC
I just confirmed with a daily build [1] that this is really solved. Great job, thank you very much.

[1] http://dev-builds.libreoffice.org/daily/libreoffice-4-1/Linux-x86_64@31-Release-Configuration-RHEL5-Baseline/current/libreoffice-4-1~2013-05-30_22.35.19_LibreOffice_4.0.4.1_Linux_x86-64_rpm.tar.gz