Problem description: If you open an RTF file with Writer and save it without modifying, it is no longer compatible with some RTF readers. Steps to reproduce: 1. Create an RTF file like this {\rtf1\ansi\deff11 {\fonttbl {\f11\fmodern\fcharset0 Courier New;} {\f34\fmodern\fcharset204 Courier New Cyr;} } {\f11 [ita,rus\par} {\f11 POTENZA\par} {\f34 \'c8\'c7\'cc\'c5\'cd\'c5\'cd\'cd\'ce\'c5\'20\'c7\'cd\'c0\'d7\'c5\'cd\'c8\'c5\par} } 2. Open it with Writer and, without modifying it, save it with another name. 3. If you open the RTF file with a text editor you'll see that all fonts charsets are wrong. Also the hexadecimal coding of the cyrillic phrase is wrong (whereas the unicode is right). It seems that the first digit is always 1 while the second digit is correct. Current behavior: The resulting RTF is no longer compatible with other programs that read RTF. Expected behavior: The resulting RTF should continue to have the right charset for all fonts and the right hex coding for all phrases. Thanks. Luca Operating System: Windows 7 Version: 4.0.0.3 release
reproducible with LO 4.0.2.2 (Win7 Home, 64bit) Result after saving it with LO: - Different paragraph spacing - Russian text is in Calibri instead of Courier New
{\f5\froman\fprq0\fcharset1 Courier New;}{\f6\froman\fprq0\fcharset1 Courier New Cyr;}{\f9\fswiss\fprq0\fcharset1 Tahoma;} I reported similar bugs #46633, #57464 with similar "charset 1" fonts appearing in generated RTF and corrupted ANSI text.
Reproducible with LO 4.4.1.2, Win 8.1
Created attachment 118695 [details] Before and after This issue is still present in Version: 5.0.1.2 Build ID: 81898c9f5c0d43f3473ba111d7b351050be20261 Locale: es-ES (es_ES) on Windows 7 (64-bit)
Created attachment 118696 [details] the file
I see the problem that the 3rd line has a changing font, at least in Word the font name is Courier New, and after LO open + save, it becomes Liberation Serif. I'll look at that.
Miklos Vajna committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=43e049c32302620bbc134732286529496853d78a tdf#61901 RTF export: fix implicit font name of non-ascii text It will be available in 5.3.0. 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.
Miklos Vajna committed a patch related to this issue. It has been pushed to "libreoffice-5-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=181ead2326ea9359cd0077d7f3d955df1140d019&h=libreoffice-5-2 tdf#61901 RTF export: fix implicit font name of non-ascii text It will be available in 5.2.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.