diff src/file-coding.h @ 367:a4f53d9b3154 r21-1-13

Import from CVS: tag r21-1-13
author cvs
date Mon, 13 Aug 2007 11:01:07 +0200
parents fbbf69b4e8a7
children cc15677e0335
line wrap: on
line diff
--- a/src/file-coding.h	Mon Aug 13 11:00:13 2007 +0200
+++ b/src/file-coding.h	Mon Aug 13 11:01:07 2007 +0200
@@ -417,28 +417,36 @@
 
 
 /* For detecting the encoding of text */
+/* The order is chosen so that by default only ISO 2022 7-bit encodings
+   are auto-detected.  These are needed for Mule files. */
 enum coding_category_type
 {
 #ifdef MULE
-  CODING_CATEGORY_SHIFT_JIS,
   CODING_CATEGORY_ISO_7, /* ISO2022 system using only seven-bit bytes,
 			    no locking shift */
-  CODING_CATEGORY_ISO_8_DESIGNATE, /* ISO2022 system using eight-bit bytes,
-				      no locking shift, no single shift,
-				      using designation to switch charsets */
+  CODING_CATEGORY_NO_CONVERSION,
   CODING_CATEGORY_ISO_8_1, /* ISO2022 system using eight-bit bytes,
 			      no locking shift, no designation sequences,
 			      one-dimension characters in the upper half. */
   CODING_CATEGORY_ISO_8_2, /* ISO2022 system using eight-bit bytes,
 			      no locking shift, no designation sequences,
 			      two-dimension characters in the upper half. */
+  CODING_CATEGORY_ISO_8_DESIGNATE, /* ISO2022 system using eight-bit bytes,
+				      no locking shift, no single shift,
+				      using designation to switch charsets */
   CODING_CATEGORY_ISO_LOCK_SHIFT, /* ISO2022 system using locking shift */
   CODING_CATEGORY_BIG5,
-#endif /* MULE */
+  CODING_CATEGORY_SHIFT_JIS
+#else /* MULE */
   CODING_CATEGORY_NO_CONVERSION
+#endif /* not MULE */
 };
 
+#ifdef MULE
+#define CODING_CATEGORY_LAST CODING_CATEGORY_SHIFT_JIS
+#else
 #define CODING_CATEGORY_LAST CODING_CATEGORY_NO_CONVERSION
+#endif
 
 #ifdef MULE
 #define CODING_CATEGORY_SHIFT_JIS_MASK	\