Typedefs and Constants

Typedefs and Constants — Enca library typedefs, enums and constants.

Types and Values

Description

Functions

Types and Values

EncaAnalyser

typedef struct _EncaAnalyserState *EncaAnalyser;


EncaEncoding

typedef struct _EncaEncoding EncaEncoding;

Encoding, i.e. charset and surface.

This is what enca_analyse() and enca_analyse_const() return.

The charset field is an opaque numerical charset identifier, which has no meaning outside Enca library. You will probably want to use it only as enca_charset_name() argument. It is only guaranteed not to change meaning during program execution time; change of its interpretation (e.g. due to addition of new charsets) is not considered API change.

The surface field is a combination of EncaSurface flags. You may want to ignore it completely; you should use enca_set_interpreted_surfaces() to disable weird surfaces then.

Members


ENCA_CS_UNKNOWN

#define ENCA_CS_UNKNOWN (-1)

Unknown character set id.

Use enca_charset_is_known() to check for unknown charset instead of direct comparsion.


enum EncaSurface

Surface flags.

Members

ENCA_SURFACE_EOL_CR

End-of-lines are represented with CR's.

 

ENCA_SURFACE_EOL_LF

End-of-lines are represented with LF's.

 

ENCA_SURFACE_EOL_CRLF

End-of-lines are represented with CRLF's.

 

ENCA_SURFACE_EOL_MIX

Several end-of-line types, mixed.

 

ENCA_SURFACE_EOL_BIN

End-of-line concept not applicable (binary data).

 

ENCA_SURFACE_MASK_EOL

Mask for end-of-line surfaces.

 

ENCA_SURFACE_PERM_21

Odd and even bytes swapped.

 

ENCA_SURFACE_PERM_4321

Reversed byte sequence in 4byte words.

 

ENCA_SURFACE_PERM_MIX

Chunks with both endianess, concatenated.

 

ENCA_SURFACE_MASK_PERM

Mask for permutation surfaces.

 

ENCA_SURFACE_QP

Quoted printables.

 

ENCA_SURFACE_REMOVE

Recode `remove' surface.

 

ENCA_SURFACE_UNKNOWN

Unknown surface.

 

ENCA_SURFACE_MASK_ALL

Mask for all bits, withnout ENCA_SURFACE_UNKNOWN.

 

enum EncaCharsetFlags

Charset properties.

Flags ENCA_CHARSET_7BIT, ENCA_CHARSET_8BIT, ENCA_CHARSET_16BIT, ENCA_CHARSET_32BIT tell how many bits a `fundamental piece' consists of. This is different from bits per character; r.g. UTF-8 consists of 8bit pieces (bytes), but character can be composed from 1 to 6 of them.

Members

ENCA_CHARSET_7BIT

Characters are represented with 7bit characters.

 

ENCA_CHARSET_8BIT

Characters are represented with bytes.

 

ENCA_CHARSET_16BIT

Characters are represented with 2byte words.

 

ENCA_CHARSET_32BIT

Characters are represented with 4byte words.

 

ENCA_CHARSET_FIXED

One characters consists of one fundamental piece.

 

ENCA_CHARSET_VARIABLE

One character consists of variable number of fundamental pieces.

 

ENCA_CHARSET_BINARY

Charset is binary from ASCII viewpoint.

 

ENCA_CHARSET_REGULAR

Language dependent (8bit) charset.

 

ENCA_CHARSET_MULTIBYTE

Multibyte charset.

 

enum EncaNameStyle

Charset naming styles and conventions.

Members

ENCA_NAME_STYLE_ENCA

Default, implicit charset name in Enca.

 

ENCA_NAME_STYLE_RFC1345

RFC 1345 or otherwise canonical charset name.

 

ENCA_NAME_STYLE_CSTOCS

Cstocs charset name (may not exist).

 

ENCA_NAME_STYLE_ICONV

Iconv charset name (may not exist).

 

ENCA_NAME_STYLE_HUMAN

Human comprehensible description.

 

ENCA_NAME_STYLE_MIME

Preferred MIME name (may not exist).

 

enum EncaErrno

Error codes.

Members

ENCA_EOK

OK.

 

ENCA_EINVALUE

Invalid value (usually of an option).

 

ENCA_EEMPTY

Sample is empty.

 

ENCA_EFILTERED

After filtering, (almost) nothing remained.

 

ENCA_ENOCS8

Mulitibyte tests failed and language contains no 8bit charsets.

 

ENCA_ESIGNIF

Too few significant characters.

 

ENCA_EWINNER

No clear winner.

 

ENCA_EGARBAGE

Sample is garbage.

 

ENCA_NOT_A_CHAR

#define ENCA_NOT_A_CHAR 0xffff

Not-a-character in unicode tables.