Warning: That file was not part of the compilation database. It may have many parsing errors.

1#ifdef HAVE_ICONV_H
2#include <iconv.h>
3#endif
4#ifdef HAVE_SYS_ICONV_H
5#include <sys/iconv.h>
6#endif
7#include <stdlib.h>
8
9int check( const char* from, const char* to )
10{
11 iconv_t myConverter = iconv_open( to, from );
12
13 if ( myConverter != (iconv_t)-1 ) {
14 iconv_close( myConverter );
15 return 0;
16 }
17 else
18 return 1;
19}
20
21int main(int argc, char** argv)
22{
23 const char* from[] = { "CP874", "CP932", "CP936", "CP949",
24 "CP950", "CP1250", "CP1251", "CP1252",
25 "CP1253", "CP1254", "CP1255", "CP1256",
26 "CP1257", "koi8-r", 0 };
27 const char* to[] = { "UNICODELITTLE", "UNICODEBIG", 0 };
28 int fromIndex = 0;
29 int toIndex = 0;
30
31 while ( to[ toIndex ] != 0 ) {
32 while( from[ fromIndex ] != 0 ) {
33 if ( check( from[ fromIndex ], to[ toIndex ] ) != 0 )
34 exit( 1 );
35 fromIndex = fromIndex + 1;
36 }
37 toIndex = toIndex + 1;
38 fromIndex = 0;
39 }
40 exit( 0 );
41}
42

Warning: That file was not part of the compilation database. It may have many parsing errors.