Merge branch 'tk/doc-filter-branch' into maint-1.8.1
[gitweb.git] / parse-options.c
index 670bf09b452e5e74a76df17535ea53b133d26091..7ca8f2caef5606cdac98e9a96c0226a53695f763 100644 (file)
@@ -471,8 +471,11 @@ int parse_options(int argc, const char **argv, const char *prefix,
        default: /* PARSE_OPT_UNKNOWN */
                if (ctx.argv[0][1] == '-') {
                        error("unknown option `%s'", ctx.argv[0] + 2);
-               } else {
+               } else if (isascii(*ctx.opt)) {
                        error("unknown switch `%c'", *ctx.opt);
+               } else {
+                       error("unknown non-ascii option in string: `%s'",
+                             ctx.argv[0]);
                }
                usage_with_options(usagestr, options);
        }