#include <my_global.h>#include <m_ctype.h>#include <my_sys.h>#include <mysql_version.h>#include <stdio.h>Include dependency graph for test_charset.c:

Go to the source code of this file.
Defines | |
| #define | NOT_USED_ANYMORE |
Functions | |
| static void | _print_array (uint8 *data, uint size) |
| static void | _print_csinfo (CHARSET_INFO *cs) |
| int | main (int argc, char **argv) |
| #define NOT_USED_ANYMORE |
Definition at line 24 of file test_charset.c.
Referenced by _print_csinfo().
00025 { 00026 uint i; 00027 for (i = 0; i < size; ++i) 00028 { 00029 if (i == 0 || i % 16 == size % 16) printf(" "); 00030 printf(" %02x", data[i]); 00031 if ((i+1) % 16 == size % 16) printf("\n"); 00032 } 00033 }
Here is the caller graph for this function:

| static void _print_csinfo | ( | CHARSET_INFO * | cs | ) | [static] |
Definition at line 35 of file test_charset.c.
References _print_array(), charset_info_st::ctype, charset_info_st::mbmaxlen, charset_info_st::name, charset_info_st::number, charset_info_st::sort_order, charset_info_st::strxfrm_multiply, charset_info_st::to_lower, and charset_info_st::to_upper.
Referenced by main().
00036 { 00037 printf("%s #%d\n", cs->name, cs->number); 00038 printf("ctype:\n"); _print_array(cs->ctype, 257); 00039 printf("to_lower:\n"); _print_array(cs->to_lower, 256); 00040 printf("to_upper:\n"); _print_array(cs->to_upper, 256); 00041 printf("sort_order:\n"); _print_array(cs->sort_order, 256); 00042 printf("collate: %3s (%d, %p, %p, %p)\n", 00043 cs->strxfrm_multiply ? "yes" : "no", 00044 cs->strxfrm_multiply, 00045 cs->strnncoll, 00046 cs->strnxfrm, 00047 cs->like_range); 00048 printf("multi-byte: %3s (%d, %p, %p, %p)\n", 00049 cs->mbmaxlen > 1 ? "yes" : "no", 00050 cs->mbmaxlen, 00051 cs->ismbchar, 00052 cs->ismbhead, 00053 cs->mbcharlen); 00054 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int main | ( | int | argc, | |
| char ** | argv | |||
| ) |
Definition at line 57 of file test_charset.c.
References _print_csinfo(), charsets_dir, DBUG_PUSH, get_charset_by_name(), MY_CS_COMPILED, MY_CS_CONFIG, MY_CS_INDEX, MY_CS_LOADED, my_free, my_init(), MY_WME, and MYF.
00057 { 00058 const char *the_set = MYSQL_CHARSET; 00059 char *cs_list; 00060 int argcnt = 1; 00061 CHARSET_INFO *cs; 00062 00063 my_init(); 00064 00065 if (argc > argcnt && argv[argcnt][0] == '-' && argv[argcnt][1] == '#') 00066 DBUG_PUSH(argv[argcnt++]+2); 00067 00068 if (argc > argcnt) 00069 the_set = argv[argcnt++]; 00070 00071 if (argc > argcnt) 00072 charsets_dir = argv[argcnt++]; 00073 00074 if (!(cs= get_charset_by_name(the_set, MYF(MY_WME)))) 00075 return 1; 00076 00077 puts("CHARSET INFO:"); 00078 _print_csinfo(cs); 00079 fflush(stdout); 00080 00081 #define NOT_USED_ANYMORE 00082 cs_list = list_charsets(MYF(MY_CS_COMPILED | MY_CS_CONFIG)); 00083 printf("LIST OF CHARSETS (compiled + *.conf):\n%s\n", cs_list); 00084 my_free(cs_list,MYF(0)); 00085 00086 cs_list = list_charsets(MYF(MY_CS_INDEX | MY_CS_LOADED)); 00087 printf("LIST OF CHARSETS (index + loaded):\n%s\n", cs_list); 00088 my_free(cs_list,MYF(0)); 00089 #endif 00090 00091 return 0; 00092 }
Here is the call graph for this function:

1.4.7

