https://bugs.documentfoundation.org/show_bug.cgi?id=148413

--- Comment #1 from Mike Kaganski <[email protected]> ---
Relevant:

1. SwHTMLWriter::WriteStream [1], which initializes m_eDestEnc using
SvxHtmlOptions::GetTextEncoding [2];
2. officecfg.Office.Common/Filter/HTML/Export/Encoding configuration value,
which is void by default, and is not editable until commit
7c5ca44c48b05ba73defd48057a82db7dc833e0c [3];
3. Thread encoding, used in SvtSysLocale::GetBestMimeEncoding [4], which is
~always non-UTF-8 on Windows;
4. HtmlWriter::attribute [5], using fixed UTF-8 encoding, and so unsynchronized
with #1;
5. Other places that write strings (like HtmlWriterHelper::applyColor [6],
which is used in Writer's HTML filter), which also use UTF-8 unconditionally.

It seems that the best option would be to use UTF-8 unconditionally in #1, and
just drop (ignore) #2 and #3.

[1]
https://opengrok.libreoffice.org/xref/core/sw/source/filter/html/wrthtml.cxx?r=5de24375#342
[2]
https://opengrok.libreoffice.org/xref/core/svtools/source/config/htmlcfg.cxx?r=96e3a641#93
[3] https://git.libreoffice.org/core/+/7c5ca44c48b05ba73defd48057a82db7dc833e0c
[4]
https://opengrok.libreoffice.org/xref/core/unotools/source/misc/syslocale.cxx?r=55adeb1c#177
[5]
https://opengrok.libreoffice.org/xref/core/svtools/source/svhtml/HtmlWriter.cxx?r=ad1557f5#153
[6]
https://opengrok.libreoffice.org/xref/core/svtools/source/svhtml/htmlout.cxx?r=96e3a641#981

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to