X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=charset%2Fsetnames.c;h=d4d8f3e081d05dabf0b1f81178844fedded402ef;hb=eec6d2c37cbcbf9c350aa4ca80e5a316e5144087;hp=5aeca021bf8f9c2ebdd069ca2c0835dafd2dcc3a;hpb=7b33fa5c0b236edc14007775b6cad248f713e2a7;p=libucw.git diff --git a/charset/setnames.c b/charset/setnames.c index 5aeca021..d4d8f3e0 100644 --- a/charset/setnames.c +++ b/charset/setnames.c @@ -1,18 +1,21 @@ /* * Character Set Conversion Library 1.0 -- Character Set Names * - * (c) 1998--2001 Martin Mares + * (c) 1998--2005 Martin Mares + * (c) 2007 Pavel Charvat * * This software may be freely distributed and used according to the terms * of the GNU General Public License. */ -#include "lib/lib.h" -#include "charset/charconv.h" +#include +#include #include -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", @@ -30,17 +33,20 @@ static char *cs_names[] = { "ISO-8859-15", "ISO-8859-16", "windows-1250", + "windows-1251", "windows-1252", "x-kam-cs", "CSN_369103", "cp852", "x-mac-ce", "x-cork", - "utf-8" + "utf-8", + "utf-16be", + "utf-16le" }; int -find_charset_by_name(char *c) +find_charset_by_name(const char *c) { unsigned int i; @@ -56,5 +62,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]; }