static int opt_count = -1;
static int opt_send_ttl = 64;
static uint8_t opt_send_qos = 0;
+static int opt_utf8_force = 0;
+static int opt_utf8_disable = 0;
static int host_num = 0;
while (1)
{
- optchar = getopt (argc, argv, "46c:hi:I:t:Q:f:D:");
+ optchar = getopt (argc, argv, "46uUc:hi:I:t:Q:f:D:");
if (optchar == -1)
break;
opt_addrfamily = (optchar == '4') ? AF_INET : AF_INET6;
break;
+ case 'u':
+ opt_utf8_force = 1;
+ break;
+ case 'U':
+ opt_utf8_disable = 1;
+ break;
+
case 'c':
{
int new_count;
}
}
+ if (opt_utf8_disable && opt_utf8_force)
+ fprintf (stderr, "Ignoring contradictory unicode flags\n");
+
return (optind);
} /* }}} read_options */
#if USE_NCURSES
static int unicode_locale() /* {{{ */
{
- return _nc_unicode_locale();
+ return ( _nc_unicode_locale() || opt_utf8_force ) && !opt_utf8_disable;
} /* }}} int unicode_locale */
static int update_prettyping_graph (ping_context_t *ctx, /* {{{ */