related: fdo#77979: writerfilter RTF import: read encoded font name

The font name is encoded in the font's charset given by \fcharset.

(cherry picked from commit 04d5a280beeeb6e056df68395dc9c3b3a674361b)

Conflicts:
	writerfilter/source/rtftok/rtfdocumentimpl.cxx

Change-Id: Id9520649a1eb3b55f4314e140abda7399f23d925
fallback to DefaultEncoding when eCurrentEncoding is unknown

as seen when saving abi10092-1 to rtf

sal/rtl/string.cxx:186: OSL_ASSERT: pTarget != NULL && (pSource != NULL ||
nLength == 0) && nLength >= 0 && (nLength == 0 || rtl_isOctetTextEncoding(nEncoding))

Change-Id: I638b94041899145f42ecd80982d8e7c0330b35c0
(cherry picked from commit bcca34ed26d82cc79b796ae16ef946fc13f0b1cf)
fdo#77979: sw: RTF export: write non-ASCII font names encoded

Currently font names like "微软雅黑" (Microsoft YaHei) are
written as "????" in the RTF export; to avoid that, set the \fcharset
of the font entry to something that at least is able to encode
the font name and alternate name.

This requires a new function since the existing
rtl_TextEncodingToWinCharset was changed in
b88fe998ce8c80d7629fe70118311096615d959d to return "default" 0x01
(for OOXML) which is quite unhelpful for RTF.

This is not entirely satisfactory, as of course that is no guarantee
that the encoding can represent all of the actual text that has the
font applied; hence there are some \'3f in the fall-back encoded text
of the heading of the bugdoc, which indicates that the detected
Shift-JIS is insufficient and GB-2132 would be required; but it's not
obvious how to do better here without iterating over all the text
twice, and that still leaves the possibility that all text that has a
particular font applied cannot be represented by a single non-Unicode
encoding.

But since we always write text as the \u Unicode + legacy fall-back,
this should not be a big problem since modern RTF readers will simply
read the Unicode.

Change-Id: Ie6a42294c501d014dd9f0df82638519412ca19bb
(cherry picked from commit e47a02b1524061143d8e77a54eb95c77f2e6dae2)

fdo#77979: argh forgot to add the test document
(cherry picked from commit 90b2b378aecfa1914be0ce9aa7aa4e006e225e96)