From caec28f63ff4ca55bf78fbf834170a5950e93a14 Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Sat, 16 May 2009 12:48:17 +0200 Subject: [PATCH] Warn on bad UTF-8 in the configuration file. --- src/config.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/config.c b/src/config.c index cc28bb9..2c7fdeb 100644 --- a/src/config.c +++ b/src/config.c @@ -464,6 +464,11 @@ static int config_parse_line(char* line, int line_count, void* ptr_data) hub_log(log_trace, "config_parse_line(): '%s'", line); #endif + if (!is_valid_utf8(line)) + { + hub_log(log_warning, "Invalid utf-8 characters on line %d", line_count); + } + if ((pos = strchr(line, '=')) != NULL) { pos[0] = 0;