00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _FL_UTF8_H_
00023 #define _FL_UTF8_H_
00024
00025 #include "Fl_Export.h"
00026 #include <stdio.h>
00027
00028
00029
00034 extern FL_API int fl_utf2ucs( const unsigned char *buf, int len, unsigned int *ucs);
00037 extern FL_API int fl_fast_utf2ucs(const unsigned char *buf, int len, unsigned int *ucs);
00038
00040 extern FL_API int fl_utf_charlen(char c);
00041
00045 extern FL_API int fl_ucs2utf(unsigned int ucs, char *buf);
00046
00050 extern FL_API int fl_utflen(const unsigned char *buf, int len);
00051
00054 extern FL_API int fl_utf_nb_char(const unsigned char *buf, int len);
00055
00061 extern FL_API int fl_utf_strncasecmp(const char *s1, const char *s2, int n);
00062
00067 extern FL_API int fl_utf_strcasecmp(const char *s1, const char *s2);
00068
00073 extern FL_API int fl_utf_strcasecmp(const char *s1, int s1_len, const char *s2, int s2_len);
00074
00076 extern FL_API int fl_tolower(unsigned int ucs);
00077
00078 extern FL_API int fl_toupper(unsigned int ucs);
00079
00082 extern FL_API int fl_utf_tolower(const unsigned char *str, int len, char *buf);
00083
00086 extern FL_API int fl_utf_toupper(const unsigned char *str, int len, char *buf);
00087
00090 extern FL_API int fl_utf2unicode(const unsigned char *str, int len, unsigned short *buf);
00091
00094 extern FL_API int fl_unicode2utf(unsigned short *str, int len, char *buf);
00095
00098 extern FL_API int fl_utf2latin1(const unsigned char *str, int len, char *buf);
00099
00102 extern FL_API int fl_latin12utf(const unsigned char *str, int len, char *buf);
00103
00105 extern FL_API unsigned short fl_nonspacing(unsigned int ucs);
00106
00107
00108
00109
00110
00111
00112 extern FL_API char* fl_utf2mbcs(const char * s);
00113 extern FL_API char* fl_mbcs2utf(const char *s);
00114 extern FL_API int fl_chmod(const char* f, int mode);
00115 extern FL_API int fl_access(const char* f, int mode);
00116 extern FL_API int fl_stat( const char *path, struct stat *buffer );
00117 extern FL_API char* fl_getcwd( char *buf, int maxlen);
00118 extern FL_API FILE* fl_fopen(const char *f, const char *mode);
00119 extern FL_API int fl_open(const char* f, int o, int p = -1);
00120 extern FL_API int fl_unlink(const char *f);
00121 extern FL_API char* fl_getenv(const char *name);
00122
00123 extern FL_API int fl_is_nt4(void);
00124 extern FL_API int fl_is_ce(void);
00125
00128 extern FL_API int fl_find_converter(const char *from_codeset);
00129
00133 extern FL_API int fl_convert2utf(int conv_index,
00134 const unsigned char *inbuf, int &inlen,
00135 char *outbuf, int outlen);
00136
00140 extern FL_API int fl_convert2utf(const char *from_codeset,
00141 const unsigned char *inbuf, int &inlen,
00142 char *outbuf, int outlen);
00143
00144 #endif