summaryrefslogtreecommitdiff
path: root/amiga
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2011-09-12 21:56:15 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2011-09-12 21:56:15 +0000
commit6a5b10c685b07199afe856f7c17ebc0e8846ddd5 (patch)
tree1f9bdeebe51498abaac9efc68ad00ad7b9f67f86 /amiga
parentb2d5492b84e9f5234f80a205a3870e8fde448d1b (diff)
downloadnetsurf-6a5b10c685b07199afe856f7c17ebc0e8846ddd5.tar.gz
netsurf-6a5b10c685b07199afe856f7c17ebc0e8846ddd5.tar.bz2
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
Diffstat (limited to 'amiga')
-rwxr-xr-xamiga/gui.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index bee078624..e4b7c156f 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -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;
}