- output(0, "== %d %s (%d) %s (ctxt is %d)\n",
- level, tag, tag_value, raw_value, (int)ctxt);
+ char *converted = NULL;
+ int conv_fails = 0;
+ if (raw_value)
+ converted = convert_utf8_to_locale(raw_value, &conv_fails);
+ output(0, "== %d %s (%d) %s (ctxt is %d, conversion failures: %d)\n",
+ level, tag, tag_value, converted, (int)ctxt, conv_fails);