Back to index

php5  5.3.10
mbfl_encoding.h
Go to the documentation of this file.
00001 /*
00002  * "streamable kanji code filter and converter"
00003  * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved.
00004  *
00005  * LICENSE NOTICES
00006  *
00007  * This file is part of "streamable kanji code filter and converter",
00008  * which is distributed under the terms of GNU Lesser General Public 
00009  * License (version 2) as published by the Free Software Foundation.
00010  *
00011  * This software is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with "streamable kanji code filter and converter";
00018  * if not, write to the Free Software Foundation, Inc., 59 Temple Place,
00019  * Suite 330, Boston, MA  02111-1307  USA
00020  *
00021  * The author of this file:
00022  *
00023  */
00024 /*
00025  * The source code included in this files was separated from mbfilter.h
00026  * by Moriyoshi Koizumi <moriyoshi@php.net> on 20 Dec 2002. The file
00027  * mbfilter.h is included in this package .
00028  *
00029  */
00030 
00031 #ifndef MBFL_ENCODING_H
00032 #define MBFL_ENCODING_H
00033 
00034 #include "mbfl_defs.h"
00035 
00036 enum mbfl_no_encoding {
00037        mbfl_no_encoding_invalid = -1,
00038        mbfl_no_encoding_pass,
00039        mbfl_no_encoding_auto,
00040        mbfl_no_encoding_wchar,
00041        mbfl_no_encoding_byte2be,
00042        mbfl_no_encoding_byte2le,
00043        mbfl_no_encoding_byte4be,
00044        mbfl_no_encoding_byte4le,
00045        mbfl_no_encoding_base64,
00046        mbfl_no_encoding_uuencode,
00047        mbfl_no_encoding_html_ent,
00048        mbfl_no_encoding_qprint,
00049        mbfl_no_encoding_7bit,
00050        mbfl_no_encoding_8bit,
00051        mbfl_no_encoding_charset_min,
00052        mbfl_no_encoding_ucs4,
00053        mbfl_no_encoding_ucs4be,
00054        mbfl_no_encoding_ucs4le,
00055        mbfl_no_encoding_ucs2,
00056        mbfl_no_encoding_ucs2be,
00057        mbfl_no_encoding_ucs2le,
00058        mbfl_no_encoding_utf32,
00059        mbfl_no_encoding_utf32be,
00060        mbfl_no_encoding_utf32le,
00061        mbfl_no_encoding_utf16,
00062        mbfl_no_encoding_utf16be,
00063        mbfl_no_encoding_utf16le,
00064        mbfl_no_encoding_utf8,
00065        mbfl_no_encoding_utf7,
00066        mbfl_no_encoding_utf7imap,
00067        mbfl_no_encoding_ascii,
00068        mbfl_no_encoding_euc_jp,
00069        mbfl_no_encoding_sjis,
00070        mbfl_no_encoding_eucjp_win,
00071        mbfl_no_encoding_sjis_open,
00072        mbfl_no_encoding_cp932,
00073        mbfl_no_encoding_cp51932,
00074        mbfl_no_encoding_jis,
00075        mbfl_no_encoding_2022jp,
00076        mbfl_no_encoding_2022jpms,
00077        mbfl_no_encoding_cp1252,
00078        mbfl_no_encoding_cp1254,
00079        mbfl_no_encoding_8859_1,
00080        mbfl_no_encoding_8859_2,
00081        mbfl_no_encoding_8859_3,
00082        mbfl_no_encoding_8859_4,
00083        mbfl_no_encoding_8859_5,
00084        mbfl_no_encoding_8859_6,
00085        mbfl_no_encoding_8859_7,
00086        mbfl_no_encoding_8859_8,
00087        mbfl_no_encoding_8859_9,
00088        mbfl_no_encoding_8859_10,
00089        mbfl_no_encoding_8859_13,
00090        mbfl_no_encoding_8859_14,
00091        mbfl_no_encoding_8859_15,
00092        mbfl_no_encoding_euc_cn,
00093        mbfl_no_encoding_cp936,
00094        mbfl_no_encoding_euc_tw,
00095        mbfl_no_encoding_big5,
00096        mbfl_no_encoding_euc_kr,
00097        mbfl_no_encoding_2022kr,
00098        mbfl_no_encoding_uhc,
00099        mbfl_no_encoding_hz,
00100        mbfl_no_encoding_cp1251,
00101        mbfl_no_encoding_cp866,
00102        mbfl_no_encoding_koi8r,
00103        mbfl_no_encoding_koi8u,
00104        mbfl_no_encoding_8859_16,
00105        mbfl_no_encoding_armscii8,
00106        mbfl_no_encoding_cp850,
00107        mbfl_no_encoding_jis_ms,
00108        mbfl_no_encoding_cp50220,
00109        mbfl_no_encoding_cp50220raw,
00110        mbfl_no_encoding_cp50221,
00111        mbfl_no_encoding_cp50222,
00112        mbfl_no_encoding_charset_max
00113 };
00114 
00115 typedef enum mbfl_no_encoding mbfl_encoding_id;
00116 
00117 /*
00118  * encoding
00119  */
00120 typedef struct _mbfl_encoding {
00121        enum mbfl_no_encoding no_encoding;
00122        const char *name;
00123        const char *mime_name;
00124        const char *(*aliases)[];
00125        const unsigned char *mblen_table;
00126        unsigned int flag;
00127 } mbfl_encoding;
00128 
00129 MBFLAPI extern const mbfl_encoding * mbfl_name2encoding(const char *name);
00130 MBFLAPI extern const mbfl_encoding * mbfl_no2encoding(enum mbfl_no_encoding no_encoding);
00131 MBFLAPI extern enum mbfl_no_encoding mbfl_name2no_encoding(const char *name);
00132 MBFLAPI extern const mbfl_encoding ** mbfl_get_supported_encodings();
00133 MBFLAPI extern const char * mbfl_no_encoding2name(enum mbfl_no_encoding no_encoding);
00134 MBFLAPI extern const char * mbfl_no2preferred_mime_name(enum mbfl_no_encoding no_encoding);
00135 MBFLAPI extern int mbfl_is_support_encoding(const char *name);
00136 
00137 
00138 #endif /* MBFL_ENCODING_H */