src/events/SDL_keyboard.c
changeset 2229 22342048bcb8
parent 2129 047245361002
child 2268 4baee598306d
equal deleted inserted replaced
2228:bb67fd5ccfdb 2229:22342048bcb8
   446         if (key < 256) {
   446         if (key < 256) {
   447             static char temp[4];
   447             static char temp[4];
   448             char *cvt;
   448             char *cvt;
   449             temp[0] = (char) key;
   449             temp[0] = (char) key;
   450             temp[1] = '\0';
   450             temp[1] = '\0';
   451             cvt = SDL_iconv_string("UTF-8", "LATIN1", temp, 1);
   451             cvt = SDL_iconv_string("UTF-8", "ISO-8859-1", temp, 1);
   452             SDL_strlcpy(temp, cvt, SDL_arraysize(temp));
   452             if (cvt) {
   453             SDL_free(cvt);
   453                 SDL_strlcpy(temp, cvt, SDL_arraysize(temp));
       
   454                 SDL_free(cvt);
       
   455             }
   454             keyname = temp;
   456             keyname = temp;
   455         } else {
   457         } else {
   456             keyname = "unknown key";
   458             keyname = "unknown key";
   457         }
   459         }
   458     }
   460     }