X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=charset%2Fsetnames.c;h=ac99fbd74000266dad39322c1cd5492945592613;hb=dbe3b315edac25079fcbfe4df20e80b534f2a7a1;hp=02dd6a3c201c12471b83ff5c5a86ada2d75e8920;hpb=fdd2cde44efd3569ce03337a2ffeca8942add1cd;p=libucw.git diff --git a/charset/setnames.c b/charset/setnames.c index 02dd6a3c..ac99fbd7 100644 --- a/charset/setnames.c +++ b/charset/setnames.c @@ -2,19 +2,20 @@ * Character Set Conversion Library 1.0 -- Character Set Names * * (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 "ucw/lib.h" #include "charset/charconv.h" #include /* Names according to RFC 1345 (see http://www.iana.org/assignments/character-sets) */ -static char *cs_names[] = { +static const char *cs_names[] = { "US-ASCII", "ISO-8859-1", "ISO-8859-2", @@ -39,11 +40,13 @@ static char *cs_names[] = { "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; @@ -59,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]; }