# HG changeset patch # User Heiko Schlittermann (I24) # Date 1297603621 -3600 # Node ID 3269aa4bc6c31089cb70951afebd4df7c978d8bd # Parent 83c3dcaea98f99d24f07288d0b05d34039c2c993 BOM has to be at the very beginning of the config file(s). diff -r 83c3dcaea98f -r 3269aa4bc6c3 src.bail-out-on-BOM --- a/src.bail-out-on-BOM Sun Feb 13 12:12:49 2011 +0100 +++ b/src.bail-out-on-BOM Sun Feb 13 14:27:01 2011 +0100 @@ -1,16 +1,17 @@ # HG changeset patch -# Parent 2ce70237f5bfb0e5759ea2e0d9ca7e1ecfa73954 -diff -r 2ce70237f5bf -r 5db4d4f2f895 src/readconf.c ---- a/src/readconf.c Sun Feb 13 10:31:31 2011 +0100 -+++ b/src/readconf.c Sun Feb 13 12:04:17 2011 +0100 +# Parent fbf873801b0238076818528063f142b791a9b0cb + +diff -r fbf873801b02 src/readconf.c +--- a/src/readconf.c Sun Feb 13 12:15:23 2011 +0100 ++++ b/src/readconf.c Sun Feb 13 14:05:44 2011 +0100 @@ -2906,6 +2906,11 @@ while ((s = get_config_line()) != NULL) { + -+ if (config_lineno == 1 && Ustrstr(s, "\xef\xbb\xbf")) ++ if (config_lineno == 1 && Ustrstr(s, "\xef\xbb\xbf") == s) + log_write(0, LOG_PANIC_DIE|LOG_CONFIG_IN, -+ "Byte Order Mark found (config file should be plain ASCII) <%d>", config_lineno); ++ "found unexpected BOM (Byte Order Mark)"); + if (isupper(s[0])) read_macro_assignment(s);