From 2164afb8cf8de2d23da61d53019db0dda21d2e00 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Sat, 22 Dec 2012 22:44:14 +0100 Subject: [PATCH] Better error message for -futf8 --- lexer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lexer.c b/lexer.c index ee8fd4a..55557da 100644 --- a/lexer.c +++ b/lexer.c @@ -1430,7 +1430,10 @@ int lex_do(lex_file *lex) Uchar u8char; /* check for a valid utf8 character */ if (!OPTS_FLAG(UTF8) || !u8_analyze(lex->tok.value, NULL, NULL, &u8char, 8)) { - if (lexwarn(lex, WARN_MULTIBYTE_CHARACTER, "multibyte character: `%s`", lex->tok.value)) + if (lexwarn(lex, WARN_MULTIBYTE_CHARACTER, + ( OPTS_FLAG(UTF8) ? "invalid multibyte character sequence `%s`" + : "multibyte character: `%s`" ), + lex->tok.value)) return (lex->tok.ttype = TOKEN_ERROR); } else