Warn on bad UTF-8 in the configuration file.
This commit is contained in:
parent
5ea5efb875
commit
caec28f63f
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue