rtl/tencinfo.h File Reference

#include "sal/config.h"
#include "rtl/textenc.h"
#include "sal/saldllapi.h"
#include "sal/types.h"

Go to the source code of this file.

Classes

struct  _rtl_TextEncodingInfo
 Information about a text encoding. More...

Defines

#define RTL_TEXTENCODING_INFO_CONTEXT   ((sal_uInt32)0x00000001)
#define RTL_TEXTENCODING_INFO_ASCII   ((sal_uInt32)0x00000002)
#define RTL_TEXTENCODING_INFO_UNICODE   ((sal_uInt32)0x00000004)
#define RTL_TEXTENCODING_INFO_MULTIBYTE   ((sal_uInt32)0x00000008)
#define RTL_TEXTENCODING_INFO_R2L   ((sal_uInt32)0x00000010)
#define RTL_TEXTENCODING_INFO_7BIT   ((sal_uInt32)0x00000020)
#define RTL_TEXTENCODING_INFO_SYMBOL   ((sal_uInt32)0x00000040)
#define RTL_TEXTENCODING_INFO_MIME   ((sal_uInt32)0x00000080)

Typedefs

typedef struct
_rtl_TextEncodingInfo 
rtl_TextEncodingInfo
 Information about a text encoding.

Functions

SAL_DLLPUBLIC sal_Bool rtl_isOctetTextEncoding (rtl_TextEncoding nEncoding)
 Determine whether a text encoding uses single octets as basic units of information (and can thus be used with the conversion routines in rtl/textcvt.h).
SAL_DLLPUBLIC sal_Bool rtl_getTextEncodingInfo (rtl_TextEncoding eTextEncoding, rtl_TextEncodingInfo *pEncInfo)
 Return information about a text encoding.
SAL_DLLPUBLIC rtl_TextEncoding rtl_getTextEncodingFromWindowsCharset (sal_uInt8 nWinCharset)
 Map from a numeric Windows charset to a text encoding.
SAL_DLLPUBLIC rtl_TextEncoding rtl_getTextEncodingFromMimeCharset (const sal_Char *pMimeCharset)
 Map from a MIME charset to a text encoding.
SAL_DLLPUBLIC rtl_TextEncoding rtl_getTextEncodingFromUnixCharset (const sal_Char *pUnixCharset)
 Map from a Unix charset to a text encoding.
SAL_DLLPUBLIC sal_uInt8 rtl_getBestWindowsCharsetFromTextEncoding (rtl_TextEncoding eTextEncoding)
 Map from a text encoding to the best matching numeric Windows charset.
SAL_DLLPUBLIC char const * rtl_getMimeCharsetFromTextEncoding (rtl_TextEncoding nEncoding)
 Map from a text encoding to a corresponding MIME charset name, if available (see <http://www.iana.org/assignments/character-sets>).
SAL_DLLPUBLIC const sal_Charrtl_getBestMimeCharsetFromTextEncoding (rtl_TextEncoding eTextEncoding)
 Map from a text encoding to the best matching MIME charset.
SAL_DLLPUBLIC const sal_Charrtl_getBestUnixCharsetFromTextEncoding (rtl_TextEncoding eTextEncoding)
 Map from a text encoding to the best matching Unix charset.
SAL_DLLPUBLIC rtl_TextEncoding rtl_getTextEncodingFromWindowsCodePage (sal_uInt32 nCodePage)
 Map from a Windows code page to a text encoding.
SAL_DLLPUBLIC sal_uInt32 rtl_getWindowsCodePageFromTextEncoding (rtl_TextEncoding nEncoding)
 Map from a text encoding to a Windows code page.

Define Documentation

#define RTL_TEXTENCODING_INFO_7BIT   ((sal_uInt32)0x00000020)
#define RTL_TEXTENCODING_INFO_ASCII   ((sal_uInt32)0x00000002)
#define RTL_TEXTENCODING_INFO_CONTEXT   ((sal_uInt32)0x00000001)
#define RTL_TEXTENCODING_INFO_MIME   ((sal_uInt32)0x00000080)
#define RTL_TEXTENCODING_INFO_MULTIBYTE   ((sal_uInt32)0x00000008)
#define RTL_TEXTENCODING_INFO_R2L   ((sal_uInt32)0x00000010)
#define RTL_TEXTENCODING_INFO_SYMBOL   ((sal_uInt32)0x00000040)
#define RTL_TEXTENCODING_INFO_UNICODE   ((sal_uInt32)0x00000004)

Typedef Documentation

Information about a text encoding.


Function Documentation

SAL_DLLPUBLIC const sal_Char* rtl_getBestMimeCharsetFromTextEncoding ( rtl_TextEncoding  eTextEncoding  ) 

Map from a text encoding to the best matching MIME charset.

Parameters:
eTextEncoding Any rtl_TextEncoding value.
Returns:
The best matching MIME charset string, or null if none matches.
SAL_DLLPUBLIC const sal_Char* rtl_getBestUnixCharsetFromTextEncoding ( rtl_TextEncoding  eTextEncoding  ) 

Map from a text encoding to the best matching Unix charset.

Parameters:
eTextEncoding Any rtl_TextEncoding value.
Returns:
The best matching Unix charset string, or null if none matches.
SAL_DLLPUBLIC sal_uInt8 rtl_getBestWindowsCharsetFromTextEncoding ( rtl_TextEncoding  eTextEncoding  ) 

Map from a text encoding to the best matching numeric Windows charset.

Parameters:
eTextEncoding Any rtl_TextEncoding value.
Returns:
The best matching numeric Windows charset, or 1 if none matches.
SAL_DLLPUBLIC char const* rtl_getMimeCharsetFromTextEncoding ( rtl_TextEncoding  nEncoding  ) 

Map from a text encoding to a corresponding MIME charset name, if available (see <http://www.iana.org/assignments/character-sets>).

Parameters:
nEncoding Any rtl_TextEncoding value.
Returns:
The (preferred) MIME charset name corresponding to the given encoding, or NULL if none is available.
SAL_DLLPUBLIC rtl_TextEncoding rtl_getTextEncodingFromMimeCharset ( const sal_Char pMimeCharset  ) 

Map from a MIME charset to a text encoding.

Parameters:
pMimeCharset Any MIME charset string. Must not be null.
Returns:
The corresponding rtl_TextEncoding value, or RTL_TEXTENCODING_DONTKNOW if no mapping is applicable.
SAL_DLLPUBLIC rtl_TextEncoding rtl_getTextEncodingFromUnixCharset ( const sal_Char pUnixCharset  ) 

Map from a Unix charset to a text encoding.

Parameters:
pUnixCharset Any Unix charset string. Must not be null.
Returns:
The corresponding rtl_TextEncoding value, or RTL_TEXTENCODING_DONTKNOW if no mapping is applicable.
SAL_DLLPUBLIC rtl_TextEncoding rtl_getTextEncodingFromWindowsCharset ( sal_uInt8  nWinCharset  ) 

Map from a numeric Windows charset to a text encoding.

Parameters:
nWinCharset Any numeric Windows charset.
Returns:
The corresponding rtl_TextEncoding value, or RTL_TEXTENCODING_DONTKNOW if no mapping is applicable.
SAL_DLLPUBLIC rtl_TextEncoding rtl_getTextEncodingFromWindowsCodePage ( sal_uInt32  nCodePage  ) 

Map from a Windows code page to a text encoding.

Parameters:
nCodePage Any Windows code page number.
Returns:
The corresponding rtl_TextEncoding value (which will be an octet text encoding, see rtl_isOctetTextEncoding), or RTL_TEXTENCODING_DONTKNOW if no mapping is applicable.
SAL_DLLPUBLIC sal_Bool rtl_getTextEncodingInfo ( rtl_TextEncoding  eTextEncoding,
rtl_TextEncodingInfo pEncInfo 
)

Return information about a text encoding.

Parameters:
eTextEncoding Any rtl_TextEncoding value.
pEncInfo Returns information about the given encoding. Must not be null, and the StructSize member must be set correctly.
Returns:
True if information about the given encoding is available, false otherwise.
SAL_DLLPUBLIC sal_uInt32 rtl_getWindowsCodePageFromTextEncoding ( rtl_TextEncoding  nEncoding  ) 

Map from a text encoding to a Windows code page.

Parameters:
nEncoding Any rtl_TextEncoding value.
Returns:
The corresponding Windows code page number, or 0 if no mapping is applicable.
SAL_DLLPUBLIC sal_Bool rtl_isOctetTextEncoding ( rtl_TextEncoding  nEncoding  ) 

Determine whether a text encoding uses single octets as basic units of information (and can thus be used with the conversion routines in rtl/textcvt.h).

Parameters:
nEncoding Any rtl_TextEncoding value.
Returns:
True if the given encoding uses single octets as basic units of information, false otherwise.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 25 Nov 2013 by  doxygen 1.6.1