Change mandatory but empty values to "-".
[gedcom-parse.git] / gedcom / gedcom_lex_common.c
index 4949346bb9b903a5f891e887b87ebd74aa1a18fe..68db840b4f645da43fcbd372fd474111bd95d99c 100644 (file)
@@ -26,6 +26,7 @@
 #include "gedcom_internal.h"
 #include "multilex.h"
 #include "encoding.h"
+#include "encoding_state.h"
 #include "gedcom.h"
 #include "gedcom.tabgen.h"
 #include "compat.h"
@@ -336,6 +337,8 @@ static int dummy_conv = 0;
 #define ACTION_TERMINATOR                                                     \
   { CHECK_LINE_LEN;                                                           \
     INIT_LINE_LEN;                                                            \
+    if (line_no == 1)                                                         \
+      set_read_encoding_terminator(TO_INTERNAL(yytext, str_buffer));          \
     BEGIN(INITIAL);                                                           \
   }