AlterOffice
AlterOffice 3.4 SDK C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
tencinfo.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 
3 
4 #ifndef INCLUDED_RTL_TENCINFO_H
5 #define INCLUDED_RTL_TENCINFO_H
6 
7 #include "sal/config.h"
8 
9 #include "rtl/textenc.h"
10 #include "sal/saldllapi.h"
11 #include "sal/types.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 // See rtl_TextEncodingInfo.Flags below for documentation on these values:
18 #define RTL_TEXTENCODING_INFO_CONTEXT ((sal_uInt32)0x00000001)
19 #define RTL_TEXTENCODING_INFO_ASCII ((sal_uInt32)0x00000002)
20 #define RTL_TEXTENCODING_INFO_UNICODE ((sal_uInt32)0x00000004)
21 #define RTL_TEXTENCODING_INFO_MULTIBYTE ((sal_uInt32)0x00000008)
22 #define RTL_TEXTENCODING_INFO_R2L ((sal_uInt32)0x00000010)
23 #define RTL_TEXTENCODING_INFO_7BIT ((sal_uInt32)0x00000020)
24 #define RTL_TEXTENCODING_INFO_SYMBOL ((sal_uInt32)0x00000040)
25 #define RTL_TEXTENCODING_INFO_MIME ((sal_uInt32)0x00000080)
26 
29 typedef struct _rtl_TextEncodingInfo
30 {
33  sal_uInt32 StructSize;
34 
42 
50 
55 
59 
117  sal_uInt32 Flags;
119 
132 
147  rtl_TextEncoding eTextEncoding, rtl_TextEncodingInfo* pEncInfo );
148 
161  sal_uInt8 nWinCharset );
162 
173  const char* pMimeCharset );
174 
185  const char* pUnixCharset );
186 
196  rtl_TextEncoding eTextEncoding );
197 
209  rtl_TextEncoding nEncoding );
210 
220  rtl_TextEncoding eTextEncoding );
221 
231  rtl_TextEncoding eTextEncoding );
232 
244 rtl_getTextEncodingFromWindowsCodePage(sal_uInt32 nCodePage);
245 
255 SAL_DLLPUBLIC sal_uInt32 SAL_CALL
257 
258 #ifdef __cplusplus
259 }
260 #endif
261 
262 #endif // INCLUDED_RTL_TENCINFO_H
263 
264 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SAL_DLLPUBLIC const char * rtl_getBestMimeCharsetFromTextEncoding(rtl_TextEncoding eTextEncoding)
Map from a text encoding to the best matching MIME charset.
sal_uInt8 AverageCharSize
The average number of bytes needed to encode a character in the given encoding.
Definition: tencinfo.h:54
unsigned char sal_Bool
Definition: types.h:18
SAL_DLLPUBLIC rtl_TextEncoding rtl_getTextEncodingFromUnixCharset(const char *pUnixCharset)
Map from a Unix charset to a text encoding.
unsigned char sal_uInt8
Definition: types.h:24
sal_uInt8 MinimumCharSize
The minimum number of bytes needed to encode any character in the given encoding. ...
Definition: tencinfo.h:41
sal_uInt16 rtl_TextEncoding
The various supported text encodings.
Definition: textenc.h:17
SAL_DLLPUBLIC sal_uInt32 rtl_getWindowsCodePageFromTextEncoding(rtl_TextEncoding nEncoding)
Map from a text encoding to a Windows code page.
SAL_DLLPUBLIC rtl_TextEncoding rtl_getTextEncodingFromWindowsCharset(sal_uInt8 nWinCharset)
Map from a numeric Windows charset to a text encoding.
sal_uInt8 Reserved
An unused byte, for padding.
Definition: tencinfo.h:58
sal_uInt32 StructSize
The size (in bytes) of this structure.
Definition: tencinfo.h:33
struct _rtl_TextEncodingInfo rtl_TextEncodingInfo
Information about a text encoding.
SAL_DLLPUBLIC const char * rtl_getBestUnixCharsetFromTextEncoding(rtl_TextEncoding eTextEncoding)
Map from a text encoding to the best matching Unix charset.
sal_uInt8 MaximumCharSize
The maximum number of bytes needed to encode any character in the given encoding. ...
Definition: tencinfo.h:49
Information about a text encoding.
Definition: tencinfo.h:29
SAL_DLLPUBLIC rtl_TextEncoding rtl_getTextEncodingFromMimeCharset(const char *pMimeCharset)
Map from a MIME charset to a text encoding.
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_uInt32 Flags
Any combination of the RTL_TEXTENCODING_INFO flags.
Definition: tencinfo.h:117
SAL_DLLPUBLIC sal_Bool rtl_getTextEncodingInfo(rtl_TextEncoding eTextEncoding, rtl_TextEncodingInfo *pEncInfo)
Return information about 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 rtl_TextEncoding rtl_getTextEncodingFromWindowsCodePage(sal_uInt32 nCodePage)
Map from a Windows code page to a text encoding.
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 u...
#define SAL_DLLPUBLIC
Definition: saldllapi.h:14