00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef CUTEXT_ENCODING_H
00019 #define CUTEXT_ENCODING_H
00020
00021 #include <cutext/fwd.h>
00022
00023 CU_BEGIN_DECLARATIONS
00024
00025
00026
00027
00028 typedef enum {
00029 CUTEXT_ENCODING_NONE,
00030 CUTEXT_ENCODING_UNKNOWN,
00031 CUTEXT_ENCODING_UTF8,
00032 CUTEXT_ENCODING_UTF16,
00033 CUTEXT_ENCODING_UTF16LE,
00034 CUTEXT_ENCODING_UCS2,
00035 CUTEXT_ENCODING_UCS2LE,
00036 CUTEXT_ENCODING_UCS4,
00037 CUTEXT_ENCODING_UCS4LE,
00038 #ifdef CUCONF_WORDS_BIGENDIAN
00039 CUTEXT_ENCODING_UTF16HOST = CUTEXT_ENCODING_UTF16,
00040 CUTEXT_ENCODING_UCS2HOST = CUTEXT_ENCODING_UCS2,
00041 CUTEXT_ENCODING_UCS4HOST = CUTEXT_ENCODING_UCS4,
00042 #else
00043 CUTEXT_ENCODING_UTF16HOST = CUTEXT_ENCODING_UTF16LE,
00044 CUTEXT_ENCODING_UCS2HOST = CUTEXT_ENCODING_UCS2LE,
00045 CUTEXT_ENCODING_UCS4HOST = CUTEXT_ENCODING_UCS4LE,
00046 #endif
00047 } cutext_encoding_t;
00048
00049
00050 char const *cutext_encoding_name(cutext_encoding_t enc);
00051
00052
00053
00054 cutext_encoding_t cutext_encoding_by_name(char const *enc_name);
00055
00056
00057
00058 cutext_encoding_t cutext_guess_encoding(void const *data, size_t size);
00059
00060
00061 CU_END_DECLARATIONS
00062
00063 #endif