Warn on bad UTF-8 in the configuration file.

This commit is contained in:
Jan Vidar Krey 2009-05-16 12:48:17 +02:00
parent 5ea5efb875
commit caec28f63f
1 changed files with 5 additions and 0 deletions

View File

@ -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); hub_log(log_trace, "config_parse_line(): '%s'", line);
#endif #endif
if (!is_valid_utf8(line))
{
hub_log(log_warning, "Invalid utf-8 characters on line %d", line_count);
}
if ((pos = strchr(line, '=')) != NULL) if ((pos = strchr(line, '=')) != NULL)
{ {
pos[0] = 0; pos[0] = 0;