Added proper copyright notice.
[gedcom-parse.git] / gedcom_lohi.lex
index 6d88b435ed979f3daa309bc10e96417fd0cf354a..2545343cb351e0e3137d53011f22533eccab1826 100644 (file)
@@ -1,3 +1,12 @@
+/*  This program is free software; you can redistribute it and/or modify  *
+ *  it under the terms of the GNU General Public License as published by  *
+ *  the Free Software Foundation; either version 2 of the License, or     *
+ *  (at your option) any later version.                                   *
+
+ (C) 2001 by The Genes Development Team
+ Original author: Peter Verthez (Peter.Verthez@advalvas.be)
+*/
+
 /* $Id$ */
 /* $Name$ */
 
@@ -9,6 +18,8 @@
 #include "gedcom.h"
 #include "multilex.h"
 #include "encoding.h"
+
+#define YY_NO_UNPUT
 %}
 
 %s NORMAL
@@ -328,8 +339,10 @@ int yywrap()
 
 int main()
 {
-  int tok;
-  int res = open_conv_to_internal("UTF16LE");
+  int tok, res;
+  init_encodings();
+  set_encoding_width(TWO_BYTE_LOHI);
+  res = open_conv_to_internal("UNICODE");
   if (!res) {
     gedcom_error("Unable to open conversion context: %s",
                 strerror(errno));