editeng/source/editeng/impedit4.cxx | 7 +++++++ 1 file changed, 7 insertions(+)
New commits: commit a4a865a85cfc922e75ed2ad5188e45a76bca92aa Author: Caolán McNamara <[email protected]> AuthorDate: Fri Nov 18 11:22:17 2022 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Fri Nov 18 14:54:53 2022 +0100 tdf#47679 explicitly don't write fcharset2 for text in OpenSymbol we don't convert to the charsets we claim the fonts are in when we write our text so rtf imports mangle this dubious output. cheapest thing is to just write default fcharset0 for OpenSymbol Change-Id: Iea0e0d3a9bda5b5c7bcffba8499195f50e214aa4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142935 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index bc83fc412c75..85b771bc5a29 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -357,6 +357,13 @@ ErrCode ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel ) rOutput.WriteUInt32AsString( nVal ); rtl_TextEncoding eChrSet = pFontItem->GetCharSet(); + // tdf#47679 OpenSymbol is not encoded in Symbol Encoding + // and anyway we always attempt to write as eDestEnc + // of RTL_TEXTENCODING_MS_1252 and pay no attention + // on export what encoding we claim to use for these + // fonts. + if (IsStarSymbol(pFontItem->GetFamilyName())) + eChrSet = RTL_TEXTENCODING_UTF8; DBG_ASSERT( eChrSet != 9, "SystemCharSet?!" ); if( RTL_TEXTENCODING_DONTKNOW == eChrSet ) eChrSet = osl_getThreadTextEncoding();
