]> mj.ucw.cz Git - libucw.git/blobdiff - charset/setnames.c
Merge with git+ssh://git.ucw.cz/projects/sherlock/GIT/sherlock.git
[libucw.git] / charset / setnames.c
index b1d43b59b446f46cec0637fcf74b44aaeb1e1c40..94c7d17e019490b27648deb0db2542e1d93d505e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     Character Set Conversion Library 1.0 -- Character Set Names
  *
- *     (c) 1998--2001 Martin Mares <mj@ucw.cz>
+ *     (c) 1998--2005 Martin Mares <mj@ucw.cz>
  *
  *     This software may be freely distributed and used according to the terms
  *     of the GNU General Public License.
 
 #include <string.h>
 
-static char *cs_names[] = {
+/* Names according to RFC 1345 (see http://www.iana.org/assignments/character-sets) */
+
+static const char *cs_names[] = {
        "US-ASCII",
        "ISO-8859-1",
        "ISO-8859-2",
+       "ISO-8859-3",
+       "ISO-8859-4",
+       "ISO-8859-5",
+       "ISO-8859-6",
+       "ISO-8859-7",
+       "ISO-8859-8",
+       "ISO-8859-9",
+       "ISO-8859-10",
+       "ISO-8859-11",
+       "ISO-8859-13",
+       "ISO-8859-14",
+       "ISO-8859-15",
+       "ISO-8859-16",
        "windows-1250",
+       "windows-1251",
        "windows-1252",
        "x-kam-cs",
        "CSN_369103",
@@ -27,7 +43,7 @@ static char *cs_names[] = {
 };
 
 int
-find_charset_by_name(char *c)
+find_charset_by_name(const char *c)
 {
        unsigned int i;
 
@@ -43,5 +59,5 @@ charset_name(int i)
   if (i < 0 || i > CONV_NUM_CHARSETS)
     return "x-unknown";
   else
-    return cs_names[i];
+    return (char *)cs_names[i];
 }