TRACE_WRAPPER struct PP_Var trace_ppb_char_set_get_default_char_set(PP_Instance instance) { trace_info("[PPB] {full} %s instance=%d\n", __func__+6, instance); return ppb_char_set_get_default_char_set(instance); }
static void test_default_charset(void) { // silly test actually. Both test and implementation contains almost the same code setlocale(LC_ALL, ""); char *current_charset = nl_langinfo(CODESET); struct PP_Var cs = ppb_char_set_get_default_char_set(instance); assert(strcmp(ppb_var_var_to_utf8(cs, NULL), current_charset) == 0); printf("default charset = %s\n", current_charset); ppb_var_release(cs); }