Debug print statements should not be internationalized.
authorPeter Verthez <Peter.Verthez@advalvas.be>
Sat, 25 Jan 2003 14:14:02 +0000 (14:14 +0000)
committerPeter Verthez <Peter.Verthez@advalvas.be>
Sat, 25 Jan 2003 14:14:02 +0000 (14:14 +0000)
gedcom/multilex.c

index 7ff4efe0fb5eccb2651d3e78c8b84db512bfc1ec..721702e2541184339e9bbb7079a861ff2e6d1f8d 100644 (file)
@@ -79,6 +79,7 @@ int determine_encoding(FILE* f)
   char first[2];
   int read;
 
+  set_encoding_bom(WITHOUT_BOM);
   read = fread(first, 1, 2, f);
   if (read != 2) {
     gedcom_warning(_("Error reading from input file: %s"), strerror(errno));
@@ -86,26 +87,28 @@ int determine_encoding(FILE* f)
     return ONE_BYTE;
   }
   else if ((first[0] == '0') && (first[1] == ' ')) {
-    gedcom_debug_print(_("One-byte encoding"));
+    gedcom_debug_print("One-byte encoding");
     rewind_file(f);
     return ONE_BYTE;
   }
   else if ((first[0] == '\0') && (first[1] == '0')) {
-    gedcom_debug_print(_("Two-byte encoding, high-low"));
+    gedcom_debug_print("Two-byte encoding, high-low");
     rewind_file(f);
     return TWO_BYTE_HILO;
   }
   else if ((first[0] == '\xFE') && (first[1] == '\xFF')) {
-    gedcom_debug_print(_("Two-byte encoding, high-low, with BOM"));
+    gedcom_debug_print("Two-byte encoding, high-low, with BOM");
+    set_encoding_bom(WITH_BOM);
     return TWO_BYTE_HILO;
   }
   else if ((first[0] == '0') && (first[1] == '\0')) {
-    gedcom_debug_print(_("Two-byte encoding, low-high"));
+    gedcom_debug_print("Two-byte encoding, low-high");
     rewind_file(f);
     return TWO_BYTE_LOHI;
   }
   else if ((first[0] == '\xFF') && (first[1] == '\xFE')) {
-    gedcom_debug_print(_("Two-byte encoding, low-high, with BOM"));
+    gedcom_debug_print("Two-byte encoding, low-high, with BOM");
+    set_encoding_bom(WITH_BOM);
     return TWO_BYTE_LOHI;
   }
   else if ((first[0] == '\xEF') && (first[1] == '\xBB')) {
@@ -115,7 +118,8 @@ int determine_encoding(FILE* f)
       rewind_file(f);
     }
     else if (first[0] == '\xBF') {
-      gedcom_debug_print(_("UTF-8 encoding, with BOM"));
+      set_encoding_bom(WITH_BOM);
+      gedcom_debug_print("UTF-8 encoding, with BOM");
     }
     else {
       gedcom_warning(_("Unknown encoding, falling back to one-byte"));