+/* Basic file encoding */
+#ifndef __ENCODING_H
+#define __ENCODING_H
+
+typedef enum _ENC {
+ ONE_BYTE = 0,
+ TWO_BYTE_HILO = 1,
+ TWO_BYTE_LOHI = 2
+} ENCODING;
+
int open_conv_to_internal(char* fromcode);
void close_conv_to_internal();
char* to_internal(char* str, size_t len);
void init_encodings();
-char* get_encoding(char* gedcom_name);
+void set_encoding_width(ENCODING enc);
+
+#endif /* __ENCODING_H */
# Mapping of charsets for gedcom parsing
-# Each line contains the gedcom name, appended with (LOHI) or (HILO)
-# for 2 byte encodings, and the iconv name of the charset, separated
-# by whitespace
-UNICODE(LOHI) UTF16LE
-UNICODE(HILO) UTF16BE
-ASCII ASCII
-ANSI CP1252
+# Each line contains (separated by whitespace):
+# - the gedcom name
+# - a token identifying the width of characters and the ordering;
+# currently supported values: 1, 2_LOHI, 2_HILO
+# - the iconv name of the charset
+UNICODE 2_LOHI UTF16LE
+UNICODE 2_HILO UTF16BE
+ASCII 1 ASCII
+ANSI 1 CP1252
+ANSEL 1 ANSEL