#include <string.h>#include <unistd.h>#include <signal.h>#include "gwlib/gwlib.h"Include dependency graph for test_charset.c:

Go to the source code of this file.
Functions | |
| int | main (int argc, char **argv) |
|
||||||||||||
|
Definition at line 69 of file test_charset.c. References charset_gsm_to_utf8(), charset_utf8_to_gsm(), debug(), gwlib_init(), gwlib_shutdown(), octstr_append_from_hex(), octstr_compare(), octstr_create, octstr_destroy(), octstr_dump, octstr_duplicate, and panic. 00070 {
00071 Octstr *os1, *os2;
00072
00073 gwlib_init();
00074
00075 os1 = octstr_create("");
00076 octstr_append_from_hex(os1, "411810124550421715161a");
00077 os2 = octstr_duplicate(os1);
00078 debug("", 0, "Orginal GSM charset data:");
00079 octstr_dump(os1, 0);
00080 charset_gsm_to_utf8(os1);
00081 debug("", 0, "Same data mapped to URT-8 charset:");
00082 octstr_dump(os1, 0);
00083 charset_utf8_to_gsm(os1);
00084 debug("", 0, "Same data mapped back again to GSM charset:");
00085 octstr_dump(os1, 0);
00086
00087 if (octstr_compare(os1, os2) != 0)
00088 panic(0, "Data is not the same after re-mapping!");
00089 else
00090 debug("",0,"Data is same, ok.");
00091
00092 octstr_destroy(os1);
00093 octstr_destroy(os2);
00094 gwlib_shutdown();
00095 return 0;
00096 }
|
Here is the call graph for this function:
