src/stdlib/SDL_iconv.c
changeset 2142 ca80c942e69c
parent 2136 5a1b6fe6e90f
child 2143 e906da4414a3
equal deleted inserted replaced
2141:e1a70460c354 2142:ca80c942e69c
   108 static struct
   108 static struct
   109 {
   109 {
   110     const char *name;
   110     const char *name;
   111     int format;
   111     int format;
   112 } encodings[] = {
   112 } encodings[] = {
   113     {
   113 /* *INDENT-OFF* */
   114     "ASCII", ENCODING_ASCII}, {
   114     { "646", ENCODING_ASCII },
   115     "US-ASCII", ENCODING_ASCII}, {
   115     { "ASCII", ENCODING_ASCII },
   116     "LATIN1", ENCODING_LATIN1}, {
   116     { "US-ASCII", ENCODING_ASCII },
   117     "ISO-8859-1", ENCODING_LATIN1}, {
   117     { "LATIN1", ENCODING_LATIN1 },
   118     "UTF8", ENCODING_UTF8}, {
   118     { "8859-1", ENCODING_LATIN1 },
   119     "UTF-8", ENCODING_UTF8}, {
   119     { "ISO-8859-1", ENCODING_LATIN1 },
   120     "UTF16", ENCODING_UTF16}, {
   120     { "UTF8", ENCODING_UTF8 },
   121     "UTF-16", ENCODING_UTF16}, {
   121     { "UTF-8", ENCODING_UTF8 },
   122     "UTF16BE", ENCODING_UTF16BE}, {
   122     { "UTF16", ENCODING_UTF16 },
   123     "UTF-16BE", ENCODING_UTF16BE}, {
   123     { "UTF-16", ENCODING_UTF16 },
   124     "UTF16LE", ENCODING_UTF16LE}, {
   124     { "UTF16BE", ENCODING_UTF16BE },
   125     "UTF-16LE", ENCODING_UTF16LE}, {
   125     { "UTF-16BE", ENCODING_UTF16BE },
   126     "UTF32", ENCODING_UTF32}, {
   126     { "UTF16LE", ENCODING_UTF16LE },
   127     "UTF-32", ENCODING_UTF32}, {
   127     { "UTF-16LE", ENCODING_UTF16LE },
   128     "UTF32BE", ENCODING_UTF32BE}, {
   128     { "UTF32", ENCODING_UTF32 },
   129     "UTF-32BE", ENCODING_UTF32BE}, {
   129     { "UTF-32", ENCODING_UTF32 },
   130     "UTF32LE", ENCODING_UTF32LE}, {
   130     { "UTF32BE", ENCODING_UTF32BE },
   131     "UTF-32LE", ENCODING_UTF32LE}, {
   131     { "UTF-32BE", ENCODING_UTF32BE },
   132     "UCS2", ENCODING_UCS2}, {
   132     { "UTF32LE", ENCODING_UTF32LE },
   133     "UCS-2", ENCODING_UCS2}, {
   133     { "UTF-32LE", ENCODING_UTF32LE },
   134     "UCS4", ENCODING_UCS4}, {
   134     { "UCS2", ENCODING_UCS2 },
   135 "UCS-4", ENCODING_UCS4},};
   135     { "UCS-2", ENCODING_UCS2 },
       
   136     { "UCS4", ENCODING_UCS4 },
       
   137     { "UCS-4", ENCODING_UCS4 },
       
   138 /* *INDENT-ON* */
       
   139 };
   136 
   140 
   137 SDL_iconv_t
   141 SDL_iconv_t
   138 SDL_iconv_open(const char *tocode, const char *fromcode)
   142 SDL_iconv_open(const char *tocode, const char *fromcode)
   139 {
   143 {
   140     int src_fmt = ENCODING_UNKNOWN;
   144     int src_fmt = ENCODING_UNKNOWN;