--- rxvt-unicode/src/xdefaults.C 2011/11/28 16:09:15 1.155 +++ rxvt-unicode/src/xdefaults.C 2011/12/02 09:02:05 1.158 @@ -586,7 +586,7 @@ * "rxvt" "keysym" "0xFF01" * value will be a string */ -int +static int rxvt_define_key (XrmDatabase *database ecb_unused, XrmBindingList bindings ecb_unused, XrmQuarkList quarks, @@ -665,7 +665,7 @@ { unsigned int i; - for (i=0; i < ecb_array_length (keysym_vocabulary); ++i) + for (i = 0; i < ecb_array_length (keysym_vocabulary); ++i) { if (strncmp (str, keysym_vocabulary [i].name, keysym_vocabulary [i].len) == 0) { @@ -692,7 +692,9 @@ return -1; } - keyboard->register_user_translation (sym, state, arg); + wchar_t *ws = rxvt_mbstowcs (arg); + keyboard->register_user_translation (sym, state, ws); + free (ws); return 1; }