Macros | Functions
encoding.h File Reference
#include <stdlib.h>
#include <s3types.h>

Go to the source code of this file.

Macros

#define IND_ISO88591   0
 
#define ISO88591   "iso8859-1"
 
#define IND_GB2312HEX   1
 
#define GB2312HEX   "gb2312-hex"
 
#define IND_GB2312   2
 
#define GB2312   "gb2312"
 
#define IND_BADENCODING   -1
 
#define BADENCODING   "BAD_ENCODING"
 

Functions

int encoding_str2ind (const char *enc)
 
S3DECODER_EXPORT int encoding_resolve (const char *inputenc, const char *outputenc)
 
void hextocode (char *src)
 
int ishex (const char *str)
 

Macro Definition Documentation

◆ BADENCODING

#define BADENCODING   "BAD_ENCODING"

◆ GB2312

#define GB2312   "gb2312"

◆ GB2312HEX

#define GB2312HEX   "gb2312-hex"

◆ IND_BADENCODING

#define IND_BADENCODING   -1

◆ IND_GB2312

#define IND_GB2312   2

◆ IND_GB2312HEX

#define IND_GB2312HEX   1

◆ IND_ISO88591

#define IND_ISO88591   0

◆ ISO88591

#define ISO88591   "iso8859-1"

Function Documentation

◆ encoding_resolve()

S3DECODER_EXPORT int encoding_resolve ( const char *  inputenc,
const char *  outputenc 
)

Resolve whether encoding is legitimate

Returns
whether the two encoding could be resolved.
Parameters
inputencIn: Input encoding
outputencIn: Input encoding

◆ encoding_str2ind()

int encoding_str2ind ( const char *  enc)

Get encoding index from encoding scheme string.

Returns
the index of the encoding scheme
Parameters
encIn: Input encoding

◆ hextocode()

void hextocode ( char *  src)

Convert hex to code.

Parameters
srcIn/Out: Input and output string where in-place conversion took place

◆ ishex()

int ishex ( const char *  str)