Convert keypresses to UCS4. Fixes issue with typing Euro symbol (¤). Probably fixes

other characters in more exotic character sets.

svn path=/trunk/netsurf/; revision=12789
This commit is contained in:
Chris Young 2011-09-12 21:56:15 +00:00
parent b2d5492b84
commit 6a5b10c685

View File

@ -811,6 +811,7 @@ int ami_key_to_nskey(ULONG keycode, struct InputEvent *ie)
{
int nskey = 0, chars;
UBYTE buffer[20];
char *utf8 = NULL;
if(keycode >= IECODE_UP_PREFIX) return 0;
@ -903,7 +904,8 @@ int ami_key_to_nskey(ULONG keycode, struct InputEvent *ie)
default:
if((chars = MapRawKey(ie,buffer,20,NULL)) > 0)
{
nskey = buffer[0];
utf8_from_local_encoding(buffer, chars, &utf8);
nskey = utf8_to_ucs4(utf8, utf8_char_byte_length(utf8));
}
break;
}