Add a mechanism for translating to and from the coding system symbols
[sgt/charset] / charset.h
index 4874023..545784f 100644 (file)
--- a/charset.h
+++ b/charset.h
@@ -33,6 +33,7 @@ typedef enum {
     CS_ISO8859_16,
     CS_CP437,
     CS_CP850,
+    CS_CP866,
     CS_CP1250,
     CS_CP1251,
     CS_CP1252,
@@ -85,10 +86,12 @@ typedef enum {
     CS_HZ,
     CS_CP949,
     CS_PDF,
+    CS_PSSTD,
     CS_CTEXT,
+    CS_ISO2022,
     CS_BS4730,
     CS_DEC_GRAPHICS,
-    CS_ISO2022
+    CS_EUC_TW
 } charset_t;
 
 typedef struct {
@@ -195,6 +198,13 @@ int charset_from_macenc(int script, int region, int sysvers,
                        const char *fontname);
 
 /*
+ * Convert GNU Emacs coding system symbol to and from our charset
+ * identifiers.
+ */
+const char *charset_to_emacsenc(int charset);
+int charset_from_emacsenc(const char *name);
+
+/*
  * Upgrade a charset identifier to a superset charset which is
  * often confused with it. For example, people whose MUAs report
  * their mail as ASCII or ISO8859-1 often in practice turn out to