Hi Stephan,
On Fri, May 12, 2006 at 10:02:53 +0200, Stephan Bergmann wrote:
> [... rtl_getBestMime/UnixCharsetFromTextEncoding ...]
> It would probably be worthwhile to check all the current
> places where those two functions are called in the OOo code base, to
> find out what semantics the call sides expect,
I did that for some samples, it is often used as in
const sal_Char *pCharSet = rtl_getBestMimeCharsetFromTextEncoding(
eSomeTextEncoding);
rtl_TextEncoding eStreamCharSet = rtl_getTextEncodingFromMimeCharset(
pCharSet);
to write data. Which is why I came up with my proposal to choose
a charset that encompasses all characters of the encoding.
The _only_ use of rtl_getBestUnixCharsetFromTextEncoding() I found is in
psprint/source/fontmanager/fontmanager.cxx PrintFontManager::getXLFD(),
where it seems a similar assumption is made.
> (also note that it is acceptable to specify NULL for
> mpBestMime/UnixCharset).
Which IMHO should be the very last resort. In utf-8 any character of the
Unicode set can be represented, so setting those to NULL would only make
sense for very arbitrary/artificial character sets.
Eike
--
OOo/SO Calc core developer. Number formatter stricken i18n transpositionizer.
GnuPG key 0x293C05FD: 997A 4C60 CE41 0149 0DB3 9E96 2F1A D073 293C 05FD
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]