Add a mechanism for translating to and from the coding system symbols
[sgt/charset] / localenc.c
index d1ce136..5c761a8 100644 (file)
@@ -47,6 +47,7 @@ static const struct {
     { "ISO-8859-16", CS_ISO8859_16, 1 },
     { "CP437", CS_CP437, 1 },
     { "CP850", CS_CP850, 1 },
+    { "CP866", CS_CP866, 1 },
     { "CP1250", CS_CP1250, 1 },
     { "Win1250", CS_CP1250, 0 },
     { "CP1251", CS_CP1251, 1 },
@@ -144,6 +145,8 @@ int charset_from_localenc(const char *name)
        return i;
     if ( (i = charset_from_xenc(name)) != CS_NONE)
        return i;
+    if ( (i = charset_from_emacsenc(name)) != CS_NONE)
+       return i;
 
     for (i = 0; i < (int)lenof(localencs); i++) {
        const char *p, *q;