LibreOffice Module tools (master) 1
Functions
tenccvt.hxx File Reference
#include <rtl/textenc.h>
#include <tools/toolsdllapi.h>
Include dependency graph for tenccvt.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

TOOLS_DLLPUBLIC rtl_TextEncoding GetExtendedCompatibilityTextEncoding (rtl_TextEncoding eEncoding)
 return an encoding which has more defined Characters as the given encoding, but have the same definition for the defined characters e.g. More...
 
TOOLS_DLLPUBLIC rtl_TextEncoding GetExtendedTextEncoding (rtl_TextEncoding eEncoding)
 return an encoding which has more defined Characters as the given encoding. More...
 
rtl_TextEncoding GetOneByteTextEncoding (rtl_TextEncoding eEncoding)
 if the given encoding is an multi-byte encoding (which allows more than one byte per char, e.g. More...
 
TOOLS_DLLPUBLIC rtl_TextEncoding GetSOLoadTextEncoding (rtl_TextEncoding eEncoding)
 
TOOLS_DLLPUBLIC rtl_TextEncoding GetSOStoreTextEncoding (rtl_TextEncoding eEncoding)
 
TOOLS_DLLPUBLIC rtl_TextEncoding getBestMSEncodingByChar (sal_Unicode c)
 Given a Unicode character, return a legacy Microsoft Encoding which supports it. More...
 

Function Documentation

◆ getBestMSEncodingByChar()

TOOLS_DLLPUBLIC rtl_TextEncoding getBestMSEncodingByChar ( sal_Unicode  c)

Given a Unicode character, return a legacy Microsoft Encoding which supports it.

Returns RTL_TEXTENCODING_DONTKNOW if there is no encoding which could support the character

Useful as a utility to categorize unicode characters into the best fit windows charset range for exporting to ww6 & wmf or as a hint to non \u unicode token aware rtf readers

◆ GetExtendedCompatibilityTextEncoding()

TOOLS_DLLPUBLIC rtl_TextEncoding GetExtendedCompatibilityTextEncoding ( rtl_TextEncoding  eEncoding)

return an encoding which has more defined Characters as the given encoding, but have the same definition for the defined characters e.g.

: windows-1252 for iso-8859-1 or windows-1254 for iso-8859-9

Definition at line 23 of file tenccvt.cxx.

Referenced by GetExtendedTextEncoding(), and GetSOLoadTextEncoding().

◆ GetExtendedTextEncoding()

TOOLS_DLLPUBLIC rtl_TextEncoding GetExtendedTextEncoding ( rtl_TextEncoding  eEncoding)

return an encoding which has more defined Characters as the given encoding.

The encodings could be different. e.g.: windows-1251 for iso-8859-5

Definition at line 35 of file tenccvt.cxx.

References GetExtendedCompatibilityTextEncoding().

Referenced by GetSOStoreTextEncoding().

◆ GetOneByteTextEncoding()

rtl_TextEncoding GetOneByteTextEncoding ( rtl_TextEncoding  eEncoding)

if the given encoding is an multi-byte encoding (which allows more than one byte per char, e.g.

UTF-8 or Shift-JIS), a one-byte encoding is returned (normally windows-1252).

Definition at line 54 of file tenccvt.cxx.

Referenced by GetSOLoadTextEncoding(), and GetSOStoreTextEncoding().

◆ GetSOLoadTextEncoding()

TOOLS_DLLPUBLIC rtl_TextEncoding GetSOLoadTextEncoding ( rtl_TextEncoding  eEncoding)

Definition at line 69 of file tenccvt.cxx.

References GetExtendedCompatibilityTextEncoding(), and GetOneByteTextEncoding().

◆ GetSOStoreTextEncoding()

TOOLS_DLLPUBLIC rtl_TextEncoding GetSOStoreTextEncoding ( rtl_TextEncoding  eEncoding)

Definition at line 74 of file tenccvt.cxx.

References GetExtendedTextEncoding(), and GetOneByteTextEncoding().