16 #include <my_global.h>
19 #include <mysql_version.h>
23 static void _print_array(uint8 *data, uint
size)
26 for (i = 0; i <
size; ++
i)
28 if (i == 0 || i % 16 == size % 16) printf(
" ");
29 printf(
" %02x", data[i]);
30 if ((i+1) % 16 == size % 16) printf(
"\n");
36 printf(
"%s #%d\n", cs->name, cs->number);
37 printf(
"ctype:\n"); _print_array(cs->ctype, 257);
38 printf(
"to_lower:\n"); _print_array(cs->to_lower, 256);
39 printf(
"to_upper:\n"); _print_array(cs->to_upper, 256);
40 printf(
"sort_order:\n"); _print_array(cs->sort_order, 256);
41 printf(
"collate: %3s (%d, %p, %p, %p)\n",
42 cs->strxfrm_multiply ?
"yes" :
"no",
47 printf(
"multi-byte: %3s (%d, %p, %p, %p)\n",
48 cs->mbmaxlen > 1 ?
"yes" :
"no",
56 int main(
int argc,
char **argv) {
57 const char *the_set = MYSQL_CHARSET;
64 if (argc > argcnt && argv[argcnt][0] ==
'-' && argv[argcnt][1] ==
'#')
65 DBUG_PUSH(argv[argcnt++]+2);
68 the_set = argv[argcnt++];
71 charsets_dir = argv[argcnt++];
73 if (!(cs= get_charset_by_name(the_set, MYF(MY_WME))))
76 puts(
"CHARSET INFO:");