src/events/SDL_keyboard.c
changeset 2229 22342048bcb8
parent 2129 047245361002
child 2268 4baee598306d
--- a/src/events/SDL_keyboard.c	Sun Aug 12 00:01:41 2007 +0000
+++ b/src/events/SDL_keyboard.c	Sun Aug 12 05:48:51 2007 +0000
@@ -448,9 +448,11 @@
             char *cvt;
             temp[0] = (char) key;
             temp[1] = '\0';
-            cvt = SDL_iconv_string("UTF-8", "LATIN1", temp, 1);
-            SDL_strlcpy(temp, cvt, SDL_arraysize(temp));
-            SDL_free(cvt);
+            cvt = SDL_iconv_string("UTF-8", "ISO-8859-1", temp, 1);
+            if (cvt) {
+                SDL_strlcpy(temp, cvt, SDL_arraysize(temp));
+                SDL_free(cvt);
+            }
             keyname = temp;
         } else {
             keyname = "unknown key";